Android Question Icon for Marker in GoogleMapsExtras

Roger Daley

Well-Known Member
Licensed User
Longtime User
Hi All,

I am having trouble using an icon [Non default] for a marker using GoogleMapExtras. The code I am on at the moment [below] doesn't work. I have tried several arrangements without sucess.
From GoogleMapExtras library and links to Google it appears I need to use BitMapDescriptor that needs to use BitMapDescriptorFactory but I can't find anything that shows how this "chain of needs" fits together.

B4X:
        Dim MarkerOptions1 As MarkerOptions
        MarkerOptions1.Initialize
         
        Dim BTSMarker As Marker
        MarkerOptions1.Draggable(True) 
        MarkerOptions1.Position2(BTSLat, BTSLng).Snippet("pkt").Title("BASE").Icon(LoadBitmap(File.DirAssets,"BTS.png"))
        BTSMarker=GoogleMapsExtras1.AddMarker(gmap, MarkerOptions1)

When I try to run this code I get the message containing instructions:
((com.google.android.gms.maps.model.BitmapDescriptor)
I think if I knew what this meant I wouldn't have a problem.

Any help much appreciated.

Regards Roger
 

Roger Daley

Well-Known Member
Licensed User
Longtime User
Thanks Warwound,

An abosolute perfect example, sorted my problem in less than a minute.
It's a case of "The Truth is Out There", but very hard to find under the mountain of info on the forum.
It would be good if this was in the Wiki. [If it is I couldn't find it there either.]

Once again, many thanks.
Roger
 
Upvote 0
Top