Sub Class_Globals
'These global variables will be redeclared each time the activity is created.
Private OMaps As OpenMaps
Private OMapsExt As OpenMapsExt
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainLayout")
OMapsExt.Initialize(OMaps)
End Sub
Private Sub OMaps_Ready
wait for (OMaps.getZoom) COMPLETE (Zoom As Int)
LabelZoom.Text=Zoom
wait for (OMapsExt.AddressToLatLon("Torre Eiffel")) COMPLETE (ll As LatLng)
OMaps.setZoom(16)
OMaps.MoveCamera2(ll)
Dim Cr As MapCircle = OMaps.AddCircle(ll,50,2, xui.Color_Red,xui.Color_Yellow,0.5)
Dim Pl As MapPolyline = OMaps.AddPolyline(Array(pt(48.8586973, 2.296136), pt(48.8572973, 2.297036), pt(48.8572973, 2.295236)),4,xui.Color_Red)
Dim Pg As MapPolygon = OMaps.AddPolygon(Array(pt(48.8575703, 2.292737), pt(48.8561703, 2.293637), pt(48.8561703, 2.291837)),1,xui.Color_Red,xui.Color_Yellow,0.3)
WAIT FOR (OMaps.AddMarker2(ll.Latitude,ll.Longitude,"My Marker","https://cdn-icons-png.flaticon.com/512/684/684908.png")) COMPLETE (Mk As Marker)
End Sub