Select area type but not an area = Button selected but no GeoJSON
Closed this issue · 1 comments
gregallensworth commented
When a specific area is selected for filtering, this is preserved properly on page reload:
- Open the Map and select some area type other than the default, e.g. NYPD Precincts
- See that the clickable GeoJSON was drawn, and that clicking will select an area
- Select a specific area, see crash-dots filtered
- Reload the page
- See that the same filter is applied: dots are filtered, selected area name/label appear in right-hand sidebar with an X, can be cleared with the X, and so on.
However, when an area type is selected but not a specific area the UI behavior is a bit weird.
- Open the Map and select some area type other than the default, e.g. NYPD Precincts
- Reload the page
- See that the Precinct button is highlighted but it "didn't take"
- The clickable GeoJSON does not happen, but the button is highlighted
- One must select a different area type and then re-select this one, in order to cause a change so as to cause the GeoJSON to load
In short:
When loading initial state from URL params, if a geo is given but an identifier is not, the behavior should be as if one had just clicked the geo button, loading the GeoJSON and all.
gregallensworth commented
Area type is selected but no a specific area. Clickable polygons are presented.
A specific area type & area are both given. Filtering is performed to that selected area.
Neither given, no area type nor area selected