Commit 86acad98 authored by hypsug0's avatar hypsug0
Browse files

refactor: improve place_map perfs (decrease latency when refresh points)

parent f877b19b
......@@ -131,7 +131,7 @@
let cancelPlaceSearchRequest;
const loadPlaces = function () {
// Download GeoJSON data with Ajax
placeMarkers.clearLayers();
dataLoaded.Place = false;
displaySpinner(checkLoadStates(dataLoaded));
var dataBboxUrl = placeBaseUrl + '?format=json&in_bbox=' + map.getBounds().toBBoxString();
......@@ -187,6 +187,7 @@
return L.circleMarker(latlng, style_data);
}
});
placeMarkers.clearLayers();
placeMarkers.addLayer(locationLayer).addTo(map).bringToFront();
}
}
......
Markdown is supported
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