Вопрос

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.

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top