Android Question GoogleMaps always animates / zooms in from world view - how to switch off?

yonson

Active Member
Licensed User
Longtime User
I'm having a problem with using google maps whereby whenever I render a map, it always starts at the minimum zoom setting (world view) and zooms in to the location, whereas I just want it to render the location at the zoom setting I specify.

I've attached some screenshots to show the problem (1 is at the start, it then zooms into '2' afterwards).

Its really frustrating and I know there must be a solution but I can't find anything online.

The relevant code is I have a designer map fragment (3.jpg) and the relevant code is :-

B4X:
Sub Globals
 
   
          Private gmap As GoogleMap
   Private MapFragment1 As MapFragment   
   
End Sub


Sub MapFragment1_Ready
   
 
   
  gmap = MapFragment1.GetMap
   Dim cp As CameraPosition
  cp.Initialize(info.Get("lat"),info.Get("lon"), Main.defaultGooglemapZoom)
  gmap.AnimateCamera(cp)

End Sub


Where the defaultmapzoom is 17.

I've been playing around with this for days but nothing seems to work - even commenting out everything in the 'ready' function has no impact. Any help much appreciated!
 

Attachments

  • 1.jpg
    1.jpg
    27.2 KB · Views: 186
  • 2.jpg
    2.jpg
    36.8 KB · Views: 200
  • 3.jpg
    3.jpg
    91.2 KB · Views: 180
Top