B4J Question Maps: No redraw?

KMatle

Expert
Licensed User
Longtime User
I've added one marker and update the position plus change the camera position to that location. As it seems, there is no redraw of the map which causes the same marker to be drawn multiple times:

Marker.JPG

Zooming the map with +/- does a redraw (= ok) Do I miss something?

Code:

B4X:
Dim cp As CameraPosition
    cp.Initialize(Row(2), Row(1), 18)
   
    If MyMarker.IsInitialized = False Then
       MyMarker=gmap.AddMarker(cp.Target.Latitude,cp.Target.Longitude,"Here you are")
    End If
   
    MyMarker.Position=cp.Target
    gmap.MoveCamera(cp)
 

rboeck

Well-Known Member
Licensed User
Longtime User
Hi, i could solve your problem with this trick: use Addmarker2 with an custom icon, in paint.net i made the picturesize the double size as really needed; i have attached a file to look for. i didnt check, if i would work with other sizes, but it works in this combination.
 

Attachments

  • raiba.png
    raiba.png
    2.6 KB · Views: 216
Upvote 0
Top