Pregunta

I'm trying on this tutorial and now i need to get the coordinates of the points of the polygon that i draw here. Please someone explain how can i get the coordinates.

¿Fue útil?

Solución

After the

drawingManager.setMap(map);

I added ​​

google.maps.event.addListener(drawingManager, 'polygoncomplete', function (polygon) {
    var coordinates = (polygon.getPath().getArray());
    // console.log(coordinates);
    window.alert("success"+coordinates);
});

Thanks david strachan.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top