I am trying to use containsLocation
in a Google geometry library but cannot make it work ...
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"); }
The Javascript console gives an error, but it points to a function in Google lib. Therefore, I assume that the problem should be somewhere in this function.
source share