Skip to content

Picture-card basemap picker

Choose a tag to compare

@github-actions github-actions released this 10 Nov 22:31
· 60 commits to main since this release

Requested by the NetDet maps team: a basemap picker like the layer picker in Google Maps / nPerf.

mapcontrol.js - addBasemapControl(id, basemaps, { style: "cards" }) shows the active basemap as a picture card; hovering (mouse) or tapping opens a grid of cards. Card images come from a basemap's thumbnail, or its own tile at thumbnailCenter/thumbnailZoom, with its label tiles on top. Options trigger, columns (at most 2 on screens up to 640 px), keyboard and ARIA support, and dark mode. The default style stays "list".

New setBasemap(id, nameOrIndex) switches through the map's picker, keeping it in sync and calling onChange.