B4J Question Marker change icon

mtselection

Member
Licensed User
Longtime User
Hi,

I try to change icon in Marker, but the following code return a Method error.


B4X:
Public Sub SetMarkerIcon( m As Marker, URL As String)
    Private joM As JavaObject = m
    joM = joM.RunMethod("getJSObject", Null)
    joM.RunMethod("eval", Array($"this.setIcon({icon: "${URL}"});"$))
    Private joP As JavaObject
    joP.InitializeStatic("com.lynden.gmapsfx.javascript.object.GMapPoint")
    joP.RunMethod("eval", Array($"this.x: 1, this.y: 1;"$))
End Sub

java.lang.RuntimeException: Method: eval not found in: com.lynden.gmapsfx.javascript.object.GMapPoint


Exist the other way to change an icon in marker.

thanks
Maurizio
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…