Refresh the map while moving markers that form a polygon

ThePuiu

Active Member
Licensed User
Longtime User
I have a map that I generated initial four markers. Markers creates a polygon. The user can move the markers on the map. At Marker_DragEnd polygon must be drawn in the new position. I did like this:
B4X:
Sub OnMarkerDragListener1_DragEnd(Marker1 As Marker)
Dim M As LatLng        
M.Initialize(Marker1.Position.Latitude,  Marker1.Position.Longitude)
MARKERI.Set(Marker1.Title, M)

Dim PolygonOptions1 As PolygonOptions
Dim GoogleMapsExtras1 As GoogleMapsExtras
PolygonOptions1.Initialize        
PolygonOptions1.FillColor=Colors.ARGB(128, 255, 0, 0)        
PolygonOptions1.AddPoints(MARKERI)
PolygonOptions1.StrokeColor=Colors.Black        
PolygonOptions1.StrokeWidth=2            
Polygon1=GoogleMapsExtras1.AddPolygon(mFragment.GetMap, PolygonOptions1)
End Sub
But on map appear several polygons overlapping. What should I do to make refres map?
 

mkvidyashankar

Active Member
Licensed User
Longtime User
Hi

I am trying to display length of each polygon faces on gmap
not succeeded
any guidance please
thanks in advance
 
Upvote 0
Top