I have this DrawingManager Object:
drawingManager = new google.maps.drawing.DrawingManager({
drawingMode: google.maps.drawing.OverlayType.POLYGON,
Ok having the answer on my second code:
var coordinates = (polygon.getPath().getArray());
Finally I got the last array with coordinates calling this code by adding a listener to call a function that get the array:
JS
function getCoordinates() {
console.log(polygon.getPath().getArray());
}
google.maps.event.addDomListener(document.getElementById('CoordsButton'), 'click', getCoordinates);
HTML
<button id="CoordsButton">Coordinates</button>
Then when the button is clicked now I get the coords...
Thanks anyway