Skip to content
Snippets Groups Projects
Unverified Commit 2604b2b7 authored by Xaver Maierhofer's avatar Xaver Maierhofer Committed by GitHub
Browse files

[TASK] Use Promises for GeoJSON

Allow ajax requests, single or list of objects
parent 31d0209c
No related branches found
No related tags found
No related merge requests found
......@@ -82,7 +82,11 @@ define(['map/clientlayer', 'map/labellayer', 'map/button', 'leaflet', 'map/activ
if (config.geo) {
[].forEach.call(config.geo, function (geo) {
L.geoJSON(geo.json, geo.option).addTo(map);
geo.json().then(function (result) {
if (result) {
L.geoJSON(result, geo.option).addTo(map);
}
});
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment