Skip to content
Snippets Groups Projects
Commit 541c3b29 authored by Ghislain Loas's avatar Ghislain Loas Committed by Patrick Barroca
Browse files

dev #64923 improve geojson rendering

parent aecdcf76
Branches
Tags
3 merge requests!2430Dev#64923 contractuel concarneau personnaliser le fonds de la carte bib,!2421Dev#64923 contractuel concarneau personnaliser le fonds de la carte bib,!2419Dev#64923 contractuel concarneau personnaliser le fonds de la carte bib
......@@ -32,7 +32,23 @@
.addTo(map);
var url_geojson = eval(container.attr('data-osm-geojson'));
var geojsonLayer = new L.GeoJSON.AJAX(url_geojson);
var geojsonLayer = new L.GeoJSON.AJAX(url_geojson, {
style: function(feature)
{
var properties = feature.properties;
if(undefined == properties.fill)
return {};
return {
fillColor: properties['fill'],
fillOpacity: properties['fill-opacity'],
stroke: true,
color: properties['stroke'],
weight: properties['stroke-width'],
opacity: properties['stroke-opacity']
};
}
});
geojsonLayer.addTo(map);
var url_open_icon = eval(container.attr('data-osm-open-url-icon'));
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment