JMB Active Member Licensed User Longtime User Aug 22, 2019 #1 Hi there, having fun with Google Maps and FusedLocationProvider! Is it possible to make GoogleMaps automatically rotate so that it shows track up (sorry, BEARING up) rather than True North up? I can't see any setting in the designer for that. Thanks. JMB
Hi there, having fun with Google Maps and FusedLocationProvider! Is it possible to make GoogleMaps automatically rotate so that it shows track up (sorry, BEARING up) rather than True North up? I can't see any setting in the designer for that. Thanks. JMB
Erel B4X founder Staff member Licensed User Longtime User Aug 22, 2019 #2 Get the bearing in LocationChanged event, pass it to the activity with CallSub and change the map bearing by setting the CameraPosition property. Upvote 0
Get the bearing in LocationChanged event, pass it to the activity with CallSub and change the map bearing by setting the CameraPosition property.
JMB Active Member Licensed User Longtime User Aug 24, 2019 #3 Hi. I've got the location data from the fusedlocation in the main sub, but all the camera properties appear to be read only. Upvote 0
Hi. I've got the location data from the fusedlocation in the main sub, but all the camera properties appear to be read only.
DonManfred Expert Licensed User Longtime User Aug 24, 2019 #4 JMB said: from the fusedlocation Click to expand... are you sure a fusedlocation has an Bearing? JMB said: but all the camera properties appear to be read only Click to expand... You need to create a new CameraPosition Code: Copy Dim cp As CameraPosition cp.Initialize2(pos1.Latitude,pos1.Longitude,gmap.CameraPosition.Zoom,bearing, tilt)' bering and tilt must be get from GPS Position i guess... gmap.AnimateCamera(cp) Upvote 0
JMB said: from the fusedlocation Click to expand... are you sure a fusedlocation has an Bearing? JMB said: but all the camera properties appear to be read only Click to expand... You need to create a new CameraPosition Code: Copy Dim cp As CameraPosition cp.Initialize2(pos1.Latitude,pos1.Longitude,gmap.CameraPosition.Zoom,bearing, tilt)' bering and tilt must be get from GPS Position i guess... gmap.AnimateCamera(cp)
JMB Active Member Licensed User Longtime User Aug 24, 2019 #5 Thanks Manfred. The location variable is a standard Location type rather than a FusedLocation one. I hadn't spotted the Initialize2 method. That works a treat passing the bearing and lat and lon in. Thank you! Upvote 0
Thanks Manfred. The location variable is a standard Location type rather than a FusedLocation one. I hadn't spotted the Initialize2 method. That works a treat passing the bearing and lat and lon in. Thank you!