PublicMapping / districtbuilder

DistrictBuilder is web-based, open source software for collaborative redistricting.
https://districtbuilder.org
Apache License 2.0
64 stars 8 forks source link

Basemap switcher #111

Open tgilcrest opened 4 years ago

tgilcrest commented 4 years ago

We want to add a basemap switcher to the app to give users the ability to view basemaps underneath their maps. This task involves adding a basemap switcher and showing basemaps underneath the geounit lines, population labels, and district shapes. Note that because we won't have a transparency slider, we'll also have to modify how the districts appear (make them transparent) when a basemap is present. We'll use Mapbox basemaps for this. Links to be provided.

AC:

  1. There is a basemap switcher in the top right corner that allows selecting from different basemaps
    • None (default)
    • Streets
    • Satellite
    • Topography
  2. There is a preview thumbnail for each basemap option
  3. When a basemap is selected, the districts colors become transparent, with a less-transparent color border on the boundary of the district.
  4. Unlike the prototype, we should make the unassigned areas transparent (not translucent white). Note that for Mapbox GL, “transparent” is a color, so this could make it good way to drop it in as a color (and replace if we need to make it a non-transparent color).

Basemap selector (don't worry about creating the "Imagery" section for now): image.png

Transparent districts: image.png

jfrankl commented 3 years ago

I just opened a pull request that adds a basic basemap to the application #401. That will be suitable for launch.

In terms of adding a basemap switcher, I think we should spend some time thinking through our needs here. Getting the aerial imagery view to work well might be a big challenge, and I think it would be worth confirming its value. Instead of having 2 or 3 basemaps to choose from, we may want to explore an option where the user can choose between aspects of the basemap. For example: toggle street labels, toggle city labels, toggle hillshade.