fixed broken kml support
This commit is contained in:
committed by
Philipp Schaefer
parent
9754af9e67
commit
45b1691f3e
6
external/leaflet.filelayer.js
vendored
6
external/leaflet.filelayer.js
vendored
@ -44,11 +44,11 @@ var FileLoader = L.Class.extend({
|
|||||||
if (typeof content == 'string') {
|
if (typeof content == 'string') {
|
||||||
content = JSON.parse(content);
|
content = JSON.parse(content);
|
||||||
}
|
}
|
||||||
return L.geoJson(content, {
|
return L.geoJson(content, L.Util.extend({}, this.options.layerOptions, {
|
||||||
style: function (feature) {
|
style: function (feature) {
|
||||||
return feature.properties && feature.properties.style;
|
return feature.properties && feature.properties.style;
|
||||||
}
|
}
|
||||||
}).addTo(this._map);
|
})).addTo(this._map);
|
||||||
},
|
},
|
||||||
|
|
||||||
_convertToGeoJSON: function (content, format) {
|
_convertToGeoJSON: function (content, format) {
|
||||||
@ -169,4 +169,4 @@ L.Control.FileLayerLoad = L.Control.extend({
|
|||||||
|
|
||||||
L.Control.fileLayerLoad = function (options) {
|
L.Control.fileLayerLoad = function (options) {
|
||||||
return new L.Control.FileLayerLoad(options);
|
return new L.Control.FileLayerLoad(options);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user