B4J Question [SOLVED]jGoogleMaps: How to set a Marker Color

rwblinn

Well-Known Member
Licensed User
Longtime User
Hi,

could not find a property to set the marker color (like in B4A, HUE_Color...) for a jGoogleMap.

Is there a workaround available?
 

rwblinn

Well-Known Member
Licensed User
Longtime User
Yes, saw that option as well.

[SOLVED]Found the Google Maps standard markers.
 
Last edited:
Upvote 0

rboeck

Well-Known Member
Licensed User
Longtime User
What do you mean with standard markers - is it Addmarker? And how can you change the color of them?
 
Upvote 0

rwblinn

Well-Known Member
Licensed User
Longtime User
Sorry not being to explicit enough. This is what I used - googled for the icons.
Add Marker with Icon

B4X:
...
MapStartMarker = MapTrack.AddMarker2(curLL.Latitude, curLL.Longitude, "Start " & DateTime.Date(Track.StartTime), File.GetUri(File.DirAssets, "red-dot.png"))
MarkerMap.Put(MapStartMarker, "Start " & DateTime.Date(Track.StartTime))
MapStopMarker = MapTrack.AddMarker2(curLL.Latitude, curLL.Longitude, "Stop " & DateTime.Date(Track.StopTime), File.GetUri(File.DirAssets, "green-dot.png"))
MarkerMap.Put(MapStopMarker, "Stop " & DateTime.Date(Track.StartTime))
...

Marker Click
B4X:
...
Sub maptrack_MarkerClick (SelectedMarker As Marker)
    Dim title As String = MarkerMap.Get(SelectedMarker)
    sbMain.Text = "Clicked on Marker " & title
End Sub
...

Result:
upload_2016-1-12_9-15-43.png
 
Upvote 0
Top