Question

How to place marker inside polygon (this polygon already on map)? My thoughts are: find a way to inscribe for example circle to the polygon and find a center of this circle (it is not problem), but can't find way to inscribe circle.

Method getCenter() on LatLngBounds works not as expected, because math center of polygon can be out of this polygon visually.

Était-ce utile?

La solution

As said Dr.Molle this is really duplicate of this question. So, for get center of polygon need to use programm realization of anything math algorithm for find center of polygon, there is no more easy way unfortunately.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top