You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: