Skip to content

Instantly share code, notes, and snippets.

@geog4046instructor
Last active January 1, 2018 22:58
Show Gist options
  • Save geog4046instructor/b96c13a5da6403d7817a to your computer and use it in GitHub Desktop.
Save geog4046instructor/b96c13a5da6403d7817a to your computer and use it in GitHub Desktop.
ArcGIS JavaScript API - Basemap toggle
/* Adds a map control to select a basemap. Requires a div with id="basemap-toggle" inside the map div.
*
* function name: BasemapToggle
* module name: "esri/dijit/BasemapToggle"
* documentation: https://developers.arcgis.com/javascript/jssamples/widget_toggle.html
* example: http://developers.arcgis.com/javascript/samples/widget_toggle/
*/
let toggle = new BasemapToggle({
map: map,
basemap: "hybrid"
}, "basemap-toggle").startup();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment