Merge pull request #727 from strguntbr/master
Add support for property "style" to geoJson.
This commit is contained in:
6
external/leaflet.filelayer.js
vendored
6
external/leaflet.filelayer.js
vendored
@ -44,7 +44,11 @@ var FileLoader = L.Class.extend({
|
||||
if (typeof content == 'string') {
|
||||
content = JSON.parse(content);
|
||||
}
|
||||
return L.geoJson(content, this.options.layerOptions).addTo(this._map);
|
||||
return L.geoJson(content, {
|
||||
style: function (feature) {
|
||||
return feature.properties && feature.properties.style;
|
||||
}
|
||||
}).addTo(this._map);
|
||||
},
|
||||
|
||||
_convertToGeoJSON: function (content, format) {
|
||||
|
Reference in New Issue
Block a user