【发布时间】:2012-05-31 15:26:44
【问题描述】:
我正在尝试使用 Google 几何库中的 containsLocation,但无法使用...
var point = new google.maps.LatLng(51.331, 3.538);
var poly = [
new google.maps.LatLng(51.401818509550615, 3.547626782103622),
new google.maps.LatLng(51.397574277049365, 3.563607598960424),
new google.maps.LatLng(51.398540111384975, 3.567880788749134),
... // it is a lot bigger
];
if(google.maps.geometry.poly.containsLocation(point, poly) == true) {
alert("yes");
}
Javascript 控制台给出了一个错误,但它指向了 Google 库中的一个函数。所以我认为问题应该出在这个函数的某个地方。
【问题讨论】:
标签: google-maps google-maps-api-3