basemap/layer Selectors
✓ Published0🌍 Public
Aalexsroth
Last edited Nov 6, 2017
Created on Nov 6, 2017
This example demonstrates a map interface with selectable basemaps and data layers. Users switch between CartoDB’s Voyager, Positron, and Dark Matter tile basemaps via radio buttons, and toggle prevalence layers for years 2013–2016 using checkboxes. The code uses the Leaflet map library via cartodb.js, updating the tile layer’s URL for basemap changes and calling `show()` or `hide()` on sublayers for data visibility.
AI-generated description