Change the method to zoom the map camera when a suggestion is selected from the Toolbar's SearchView in MerchantsFragment, it now shows a much bigger area.

master
Severiano Jaramillo 2019-01-31 15:22:40 -06:00
parent 980517c168
commit fbb66864e5
1 changed files with 1 additions and 6 deletions

View File

@ -299,13 +299,8 @@ class MerchantsFragment : Fragment(), OnMapReadyCallback, SearchView.OnSuggestio
cursor?.close()
if (lat != null && lon != null) {
val builder = LatLngBounds.builder()
builder.include(LatLng(lat, lon))
val bounds = builder.build()
try {
mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, 100))
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(LatLng(lat, lon), 15f))
} catch (e: Exception) {
Log.d(TAG, e.message)
}