Getting 'Error: Bounds are not valid.' error while loading the KML.
shrikant-dm opened this issue · 1 comments
shrikant-dm commented
I am trying to load KML on my mapbox map. For this I am referring https://www.mapbox.com/mapbox.js/example/v1.0.0/omnivore-kml/ link.
But while loading the KML I am getting Error: Bounds are not valid. in the console. Can any one help me regarding this issue.
In my kml there are multiple Placemark are present.
Please find my KML file link https://drive.google.com/file/d/0B8N2noQryrfFQTNwdWlBTlBHeWc/view?usp=sharing
EDIT
Here is my sample code
var customLayer = L.geoJson(null, {
// http://leafletjs.com/reference.html#geojson-style
style: function(feature) {
return(
{
"color":"#ff2d27",
"weight":7,
"opacity":1,
"fill":true,
"fillOpacity":0
}
);
}
});
var runLayer = omnivore.kml('sample.kml')
.on('ready', function() {
runLayer.eachLayer(function(layer) {
layer.bindPopup(layer.feature.properties.description);
});
})
.on('error', function(e) {
console.log("Error while loading the KML file: ", e);
})
.addTo(map);
Stackoverflow link: https://gis.stackexchange.com/questions/239319/kml-is-not-loading-on-mapbox-map/239770#239770
Thanks.
shrikant-dm commented
There is issue in my KML file due to this we are getting this error. Closing this file.
https://gis.stackexchange.com/a/239770/96697