答案 0 :(得分:1)
是的,这是可能的。请参阅此功能:http://github.com/tparkin/Google-Maps-Point-in-Polygon
答案 1 :(得分:0)
Google已经提供了一个
var bermudaTriangle = new google.maps.Polygon({
paths: [
new google.maps.LatLng(25.774, -80.190),
new google.maps.LatLng(18.466, -66.118),
new google.maps.LatLng(32.321, -64.757)
]
});
google.maps.event.addListener(map, 'click', function(event) {
console.log(google.maps.geometry.poly.containsLocation(event.latLng, bermudaTriangle));
});
https://developers.google.com/maps/documentation/javascript/geometry#containsLocation