There's two maps (to ensure that we can do that without bugs).
Switching layers / legends should work; changing layers in one map should not change any state/status in the other map.
(Styling may be a touch different from Arctic EDS).
The 1st map has the 1st layer as the default; the 2nd map has the 5th as its default.
Code tour:
check the new config changes/options in the nuxt.config.js.
there's a new Store, map -- this looks a lot like the corresponding Store in Arctic-EDS, and/but you may want to cross-compare the two. I pulled out a fair amount of code where I could.
Check the FuturePrecipitationMap component for how the Map functionality is used in a component.
The idea is that each component will defined the JSON-ish object layer definitions/legends, not a 'central registry'. I did this to simplify the code a bit but also to keep it more isolated.
Layer defaults are set by setting a property in the MapLayer, not the JSON-ish object that defines the layers.
Note that the LayerList component isn't pulled over -- this is because we actually stopped using that in Arctic EDS (in favor of explicitly defining each map layer), and I kinda like this approach more.
Check those type definitions, like for Leaflet 👀 I don't think we want those files in the repo (I've flagged this for revision later) but it was expedient. And actually, kinda helpful for development.
For testing:
npm install
How/what to see in app:
Code tour:
nuxt.config.js
.map
-- this looks a lot like the corresponding Store in Arctic-EDS, and/but you may want to cross-compare the two. I pulled out a fair amount of code where I could.FuturePrecipitationMap
component for how the Map functionality is used in a component.MapLayer
, not the JSON-ish object that defines the layers.LayerList
component isn't pulled over -- this is because we actually stopped using that in Arctic EDS (in favor of explicitly defining each map layer), and I kinda like this approach more.