Merge pull request #727 from strguntbr/master

Add support for property "style" to geoJson.
This commit is contained in:
Jon Atkins
2014-01-07 00:00:40 -08:00

View File

@ -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) {