You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I can't see how to use 'data:progress' and 'data:loaded' leaflet-ajax events to trigger the spinner on and off when data is loading and then loaded. Could you give a hint on what to insert and where in the below snippet?
Thank you in advance,
Yann
var daeLayer = new L.GeoJSON.AJAX("data/opendefibrillateurs.geojson", {
pointToLayer: function (feature, latlng) {
if (feature.properties.op_hours !== null) {
var oh = new opening_hours(feature.properties.op_hours);
if ( oh !== null ) {
var state = oh.getState();
switch (state) {
case true:
return L.marker(latlng, {icon: aedDispoIcon});
break;
case false:
return L.marker(latlng, {icon: aedIndispoIcon});
break;
}
}
// si op_hours non NULL mais inexploitable donc oh NULL
else return L.marker(latlng, {icon: aedSansInfoIcon});
}
// si op_hours NULL
else return L.marker(latlng, {icon: aedSansInfoIcon});
},
onEachFeature: onEachAEDFeature
}).addTo(map);
The text was updated successfully, but these errors were encountered:
Hello,
I can't see how to use 'data:progress' and 'data:loaded' leaflet-ajax events to trigger the spinner on and off when data is loading and then loaded. Could you give a hint on what to insert and where in the below snippet?
Thank you in advance,
The text was updated successfully, but these errors were encountered: