Android Question SOLVED How to center a Google map

tigrot

Well-Known Member
Licensed User
Longtime User
Hi everybody,
I'm using V2 Maps library to show a map. I put a marker and I'd like to center the map on this marker.
How can this be done?
I'm searching a way to fix initial zoom for the map as well...
Thank you for help!

Regards
Mauro
 
Last edited:

eurojam

Well-Known Member
Licensed User
Longtime User
use cameraposition like this:
B4X:
  Dim cp As CameraPosition
   cp.Initialize(49,49,10)
   gmap.MoveCamera(cp)
use the same coordinates like your marker, then the map centers on it. you can also set the initial zoomlevel with cameraposition...
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…