I am trying to use the containsLocation
from the Google geometry library, but can\'t get it to work...
var point = new google.maps.LatLng(51.331
i had the same problem ([object Object])
, I could solve that creating the polygon variable like that:
draw = new google.maps.Polygon({paths:polyOptions});
Then the problem disappeared.
Oke, stupid me
I was wrong using all the coords as an array, I had to use the created polygon object.
var polyOptions = {
...
}
draw = new google.maps.Polygon(polyOptions);
draw.setMap(map);
if(google.maps.geometry.poly.containsLocation(point, draw) == true) {
alert("yes");
}