pacificclimate / scip-frontend

Salmon Climate Impacts Portal
GNU General Public License v3.0
1 stars 1 forks source link

map resets zoom window too often #70

Open corviday opened 3 months ago

corviday commented 3 months ago

The map resets the zoom window whenever anything (dataset, timestamp, palette) is changed. This probably means it is resetting the view on any change to wmsParams, which is what triggers loading an wms layer. I don't know if react-leaflet offers us any control over this behavior, but it's worth looking into.

rod-glover commented 2 months ago

Question: Does SCIP control the viewport (zoom window), or leave it up to Leaflet? You can pass in the viewport parameters to Leaflet, and likely should. Then it is up to SCIP to reset (or not, as apparently desired here) the viewport.

corviday commented 2 months ago

I think SCIP is currently leaving it up to leaflet. That sounds like a good direction for investigation.

rod-glover commented 2 months ago

P2A, amongst other apps, manages the viewport. Should give you a good example, especially with Quintin's recent improvements.