Hello,
I load GPS-Positions from a csv-file and place different marker. The setting and removing of marker works fine. For some reasons I want also to set labels, but also remove them later.
For setting the labels I use:
The actual call for placing the marker is:
When I use:
the specified label is set, but how can I remove it later? And how can I manage to remove a lot of labels with one call.
regards,
Benedikt
I load GPS-Positions from a csv-file and place different marker. The setting and removing of marker works fine. For some reasons I want also to set labels, but also remove them later.
For setting the labels I use:
B4X:
Sub SetMarkerLabel(mm As Marker, text As String, color As String,fontSize As String)
Dim jo As JavaObject= mm
jo=jo.RunMethod("getJSObject",Null)
Log(jo.RunMethod("eval", Array($"this.setLabel({text: "${text}",color: "${color}","fontSize": "18px"});"$)))
End Sub
The actual call for placing the marker is:
B4X:
Dim M As Marker =gmap.AddMarker2(llat, llong, "",File.GetUri(File.DirAssets,RMarkTyp))
MMap(RNoC-1).Put(i,M)
When I use:
B4X:
SetMarkerLabel(gmap.AddMarker2(llat, llong, "",File.GetUri(File.DirAssets,RMarkTyp)),MLabel,RLColor,"18px")
the specified label is set, but how can I remove it later? And how can I manage to remove a lot of labels with one call.
regards,
Benedikt