Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kmlLayerData.docs[0].gpolygons[0].Contains is not a function #126

Open
vikasebizon opened this issue Jul 19, 2019 · 0 comments
Open

kmlLayerData.docs[0].gpolygons[0].Contains is not a function #126

vikasebizon opened this issue Jul 19, 2019 · 0 comments

Comments

@vikasebizon
Copy link

Hello Support,
I have multiple kml so i parse kml filelike this :-

var kmlLayer new geoXML3.parser ({
map: map,
singleInfoWindow: false,
infoWindow: infowindow,
suppressInfoWindows: true,
zoom : false,
locationslot: tmpltkml,
afterParse: useTheData
});
kmlLayer.parse(locations[i][14]);
kmlLayers.push(kmlLayer);

All kml loaded on map successfully. After that on search button i am finding that my location within KML polygon or not, but i am getting error " kmlLayerData.docs[0].gpolygons[0].Contains is not a function"

My code is :-
find_closest_kml:function (lat,lng,map) {
var point = new google.maps.LatLng(lat,lng);
if(kmlLayers.length){
kmlLayers.forEach(function(kmlLayerData){
for (var k=0; k < kmlLayerData.docs[0].gpolygons.length; k++) {
console.log(kmlLayerData.docs[0].gpolygons[k].Contains(point));
}
});
}
}

Please help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant