Hi all.
For a new project, I have 4 markers on map and zoom in to max to show all markers. Than I use GoogleMapsExtras and PolygonOptions to do the job. But the PolygonOptions is not centered.
To show all markers I have slide the map to the right manually.
Or I click on the - button like that
And PolygonOptions still not centered.
I use this code to show PolygonOptions
What I'm doing wrong?
How to center the polygon
For a new project, I have 4 markers on map and zoom in to max to show all markers. Than I use GoogleMapsExtras and PolygonOptions to do the job. But the PolygonOptions is not centered.
To show all markers I have slide the map to the right manually.
Or I click on the - button like that
And PolygonOptions still not centered.
I use this code to show PolygonOptions
B4X:
Dim listPolygone As List
listPolygone.Initialize
Dim latlng As LatLng
latlng.Initialize(LatGrand,LntGrand)
listPolygone.Add(latlng)
latlng.Initialize(LatGrand,LntPetit)
listPolygone.Add(latlng)
latlng.Initialize(LatPetit,LntPetit)
listPolygone.Add(latlng)
latlng.Initialize(LatPetit,LntGrand)
listPolygone.Add(latlng)
Dim GoogleMapsExtras1 As GoogleMapsExtras
Dim polygonoptions1 As PolygonOptions
polygonoptions1.Initialize
polygonoptions1.FillColor=Colors.ARGB(150,255,255,0)
polygonoptions1.AddPoints(listPolygone)
polygonoptions1.StrokeColor=Colors.DarkGray
polygonoptions1.StrokeWidth=3
Dim pg As Polygon = GoogleMapsExtras1.AddPolygon(gmap, polygonoptions1)
What I'm doing wrong?
How to center the polygon