When I parse a KML file, there appears to be different behaviour with the minified version of leaflet omnivore. The minified code doesn't attach the Placemark ID to the resulting geoJSON layer, but it works correctly in the non-minified code.
Given a variable kml containing a kml file string, the following code demonstrates the different behaviour. It returns undefined with minified code, but correctly returns the ID otherwise.
var kmlLayer = omnivore.kml.parse(kml);
var firstLayer = kmlLayer.getLayers()[0];
console.log(firstLayer.feature.id);
When I parse a KML file, there appears to be different behaviour with the minified version of leaflet omnivore. The minified code doesn't attach the Placemark ID to the resulting geoJSON layer, but it works correctly in the non-minified code.
Given a variable kml containing a kml file string, the following code demonstrates the different behaviour. It returns undefined with minified code, but correctly returns the ID otherwise.
var kmlLayer = omnivore.kml.parse(kml); var firstLayer = kmlLayer.getLayers()[0]; console.log(firstLayer.feature.id);