I am unable to rotate a marker after it has been added
Here is the code I am using
B4X:
MarkerOptions1.Initialize
MarkerOptions1.Flat(True)
MarkerOptions1.Position2(dbLat, dbLng).Snippet(Snippet).Title(Title).Visible(blnVisible)
Dim BitmapDescriptor1 As BitmapDescriptor
Dim BitmapDescriptorFactory1 As BitmapDescriptorFactory
BitmapDescriptor1=BitmapDescriptorFactory1.FromAsset(IconFile)
MarkerOptions1.Icon(BitmapDescriptor1)
Marker1 = GoogleMapsExtras1.AddMarker(gmap, MarkerOptions1)
'This line doesn't work.
MarkerOptions1.Rotate(90)
if I move .Rotate above AddMarker the marker rotates properly, however my goal is to rotate markers after they have been added
Can you please let me know what is wrong with the above code
If you want to change the Markericon, I would suggest to use two markers at the same point with the different icons and switch the visiblity, so you will have the effect of changing the icon dynamically.
the 2 attached screenshots shows this as an example. There are treasureboxes and when the user clicks the icon it will be an opened treasure box...I think that is what you mean?
Thanks, for that. The code was developed for a customer, I am sorry, but I can not post the whole project. But if you have questions concerning anything, I will try to answer it, if possible.
Looks like at some point the GoogleMap API was updated and now allows both Marker Rotation and Icon to be set/changed after the Marker has been added to the map.
That's the GoogleMap API changelog and you can see there's been a few API updates made since i last updated GoogleMapsExtras.
So when i have time i'll update GoogleMapsExtras to add the newer features.
In the meantime i'm sure you can still test and see if it's possible to change a Marker Icon after the Marker has been added to the map?