Jak używać includesLocation w bibliotece geometrii map Google.
Próbuję użyćcontainsLocation
z biblioteki geometrii Google, ale nie można go uruchomić ...
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");
}
Konsola Javascript daje błąd, ale wskazuje na funkcję w bibliotece Google. Zakładam więc, że problem powinien leżeć gdzieś w tej funkcji.