I would like to detect that a google.maps.LatLng
is inside a google.maps.Polygon
.
How can I do that ?
Cheers,
You can use this in google map V3:-
google.maps.geometry.poly.containsLocation(google.maps.LatLng(latitude, longitude),polygons);
polygons is a object returned by function after polygoncomplete.
var polygons=null;
google.maps.event.addDomListener(drawingManager, "polygoncomplete", function(polygon) {
polygons=polygon;
});
reference by https://developers.google.com/maps/documentation/javascript/reference