deps: react-leaflet 1.8 -> 4.2 (+ leaflet 1.9) — the last legacy react-* lib
Ground-up hooks rewrite of the app's core map. Removes the final batch of
React-19-blocking warnings (legacy context on Map/LayersControl/TileLayer/
Marker/CircleMarker/Circle/Tooltip + ReactDOM.render from the old controls).
Core: <Map> -> <MapContainer>; .leafletElement refs (6 files) -> the map/
layer instances directly, via a <MapReady> child (useMap) + plain refs on
Marker/Circle/GeoJSON; controlled viewport (onViewportChanged + state.center/
zoom) -> <MapEvents> (useMapEvents moveend/zoomend) + imperative setView;
onClick -> eventHandlers={{click}}; Path styling -> pathOptions/style;
subsUnion takes the L.Map directly.
The 4 v1-only plugins reimplemented (new in-repo helpers under Maps/):
- react-leaflet-control -> MapControl (L.Control + createPortal)
- react-leaflet-google -> GoogleMutantLayer (createLayerComponent +
leaflet.gridlayer.googlemutant; Google Maps API already loaded by Gkeys)
- react-leaflet-fullscreen -> createControlComponent + leaflet.fullscreen
- leaflet-sleep / leaflet-graphicscale kept as vanilla (work on leaflet 1.9)
Browser-verified: /fires (tiles, OSM+Google layer switch, custom control,
fullscreen, graphic scale, pan/zoom -> re-fetch, no NaN), fire detail
(GeoJSON rect + fitBounds), home (3 maps coexist; SelectionMap draggable
marker -> updatePosition + distance circle). Console now shows 0 React
warnings on home/fires. REST smoke byte-identical.
This commit is contained in:
parent
e61a3a9bcb
commit
bc778bfd97
18 changed files with 276 additions and 220 deletions
|
|
@ -36,9 +36,11 @@
|
|||
"jquery-validation": "^1.17.0",
|
||||
"jsend": "^1.0.2",
|
||||
"juice": "^4.2.2",
|
||||
"leaflet": "^1.3.1",
|
||||
"leaflet": "^1.9.4",
|
||||
"leaflet-graphicscale": "0.0.2",
|
||||
"leaflet-sleep": "^0.5.1",
|
||||
"leaflet.fullscreen": "^3.0.2",
|
||||
"leaflet.gridlayer.googlemutant": "^0.14.1",
|
||||
"lodash": "^4.17.4",
|
||||
"loms.perlin": "^1.0.1",
|
||||
"map-common-utils": "^0.5.0",
|
||||
|
|
@ -66,10 +68,7 @@
|
|||
"react-dom": "^18.3.1",
|
||||
"react-helmet-async": "^2.0.5",
|
||||
"react-i18next": "^14.1.3",
|
||||
"react-leaflet": "^1.8.0",
|
||||
"react-leaflet-control": "^1.4.0",
|
||||
"react-leaflet-fullscreen": "0.0.6",
|
||||
"react-leaflet-google": "^3.2.1",
|
||||
"react-leaflet": "^4.2.1",
|
||||
"react-mobile-store-button": "0.0.3",
|
||||
"react-places-autocomplete": "^5.4.3",
|
||||
"react-resize-detector": "^1.1.0",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue