Android Question Google maps animated marker

MoraviaVenus

Member
Licensed User
Longtime User
Dear all,

in my app, which uses library GoogleMaps (2.00), I would like to use my custom marker, which is animated. Using custom marker can be done via command:

B4X:
...
gMap = MainMapFragment.GetMap
bmp.Initialize(File.DirAssets, "custom_marker.png")
Dim m3 As Marker = gMap.AddMarker3(48.207740, 16.366051, "Hofburg Palace", bmp)
...

..., but I want to make the marker alive, e.g. the marker will breathe (will grow and shrink). You can imagine it as an animated GIF.

Please, is it possible to have animated marker in Google map?

Thank you.
 

DonManfred

Expert
Licensed User
Longtime User
As far as i know you can not animate a marker.
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can use this code to change the marker icon:
B4X:
Sub MarkerSetIcon(marker As Marker, bmp As Bitmap)
   Dim jo As JavaObject = marker
   Dim bitmapdescriptor As JavaObject
   bitmapdescriptor.InitializeStatic("com.google.android.gms.maps.model.BitmapDescriptorFactory")
   jo.RunMethod("setIcon", Array(bitmapdescriptor.RunMethod("fromBitmap", Array(bmp))))
End Sub
 
Upvote 0
Top