I have loaded a geojson file successfully on my map. I am able to click each polygon to change stroke and access its properties. But I want to find out if certain points are within each multipolygon.
I have used google.maps.geometry.poly.containsLocation() for normal polygons. Is there either a way to extract the polygon from event.feature.getGeometry()... to use in containsLocation or another method to check for this?
map.data.loadGeoJson('inc-tracts.json');
var featureStyle = {
strokeColor: '#000000',
strokeOpacity: 0.5,
strokeWeight: 3,
}
map.data.setStyle(featureStyle);
map.data.addListener('click', function(event) {
console.log(event.feature.getProperty(CTNAME));
// This is where I want to check if point(s) fall within it.
}