I found an answer for how to get the latitude and longitude for each point of the polygon here:
Polygon Drawing and Getting Coordinates with Google Map API v3
This appeared to work when I implemented it, however is no longer working, and I get the error:
"Error: TypeError: polygon.overlay.latLngs.b is undefined"
This is my code:
function polygonPoints(polygon) {
var polygonPointsArray = [];
$.each(polygon.overlay.latLngs.b[0].b, function(key, latlng){
var lat = latlng.d;
var lon = latlng.e;
polygonPointsArray.push(lat+' '+lon); //do something with the coordinates
});
}
Any help would be greatly appreciated.
Thanks
Matt