feature: Promote the basemap toggle - #1015
Conversation
7040bfc to
17fa179
Compare
This moves the basemap toggle to a first class component. There hasn't been any known traction on the experimental API but there was uptake of the basemap switcher component itself. This also fixes some bugs with the previous implementation: 1. It is more determinante than the previous one. Mostly because it's using internal selectors and wired right to the store. 2. The CSS is more sane and ported to Less so folks can more easily override the styling without rewriting the inline styles of the component.
17fa179 to
35c3f4a
Compare
|
The keyboard navigation changes look good to me. |
I was trying to give the user a path to issue elevation. For captive users like a city employee, they'd be able to reach out and say "Hey! This looks broken, plz can fix?" I think it's a sensible to have an error state but I definitely sympathize with making it less reachable.
We don't have a bespoke "background" flag. It's only a constructed concept that the mapbook allows us to more-or-less "mock." This obviously appears a bit more broken in our demo than I think it would be on a live site. I have a few thoughts on how we could move forward:
|
|
Can the layers to turn off be caught by group title? Like catching all layers within the "Backgrounds" group title here, gm3/examples/desktop/mapbook.xml Line 529 in f2876d7 multiple="true", nested groups, or toggling between multiple groups might make things a little more complicated. |
|
Or I guess a brute force method could be configuring all the layers to turn off before turning the toggled layer on. Essentially enumerating what is a "background" for the toggle. That could simplify some of the complexity of pulling from nested group titles or multiple group titles. |
|
Could we just point the basemap toggle at a mapbook group instead of giving it it's own layer list? I think that would get rid of most of the confusing behavior between the layer control and this new control. (It wouldn't need to even necessarily be an exclusive group, but probably only makes sense for leaf groups. Click on the new control just toggles that layer and if other layers turn off is part of the normal group handling.) |
|
I wouldn't select that group for the basemap toggle. Also, the nesting could be a problem. |







This moves the basemap toggle to a first class component.
There hasn't been any known traction on the experimental API but there was uptake of the basemap switcher component itself.
This also fixes some bugs with the previous implementation:
Screencast.From.2026-08-02.11-47-47.mp4