map: cluster camera markers so cameras stay visible when zoomed in
All checks were successful
build-and-deploy / build (push) Successful in 4m33s
All checks were successful
build-and-deploy / build (push) Successful in 4m33s
Zooming in replaced the marker group with a bbox subset, so dense world views (5k dots) thinned to a handful of pins — or zero on a wrapped world copy, where currentBBox collapsed to a sliver and the API returned ~nothing. Cameras only seemed to exist when zoomed out. - vendor leaflet.markercluster 1.5.3; camera markers now render as numbered neon-green clusters at low zoom and split into individual dots as you zoom, so camera coverage is visible at every zoom level (spiderfy at max zoom) - guard against null lat/lon rows (no phantom markers at 0,0) - stale-response guard for loadCams/loadFires: rapid wheel zoom can resolve fetches out of order and a stale bbox response blanked the map - serve index.html with Cache-Control: no-cache so the browser never keeps serving a pre-deploy copy after fixes land
This commit is contained in:
parent
6f0fc8dbe3
commit
5cea0a5940
5 changed files with 121 additions and 5 deletions
14
app/static/vendor/leaflet/MarkerCluster.css
vendored
Normal file
14
app/static/vendor/leaflet/MarkerCluster.css
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {
|
||||
-webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;
|
||||
-moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;
|
||||
-o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;
|
||||
transition: transform 0.3s ease-out, opacity 0.3s ease-in;
|
||||
}
|
||||
|
||||
.leaflet-cluster-spider-leg {
|
||||
/* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */
|
||||
-webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;
|
||||
-moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;
|
||||
-o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;
|
||||
transition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;
|
||||
}
|
||||
Loading…
Reference in a new issue