This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This example shows how to add a layer list to a map where users can check and uncheck boxes to show and hide layers. | |
* The code below is combined with the code to add geojson to a map, since those two things are often used together. | |
* The code consists of five main parts: | |
* 1. Create the basemap(s) and layer(s) | |
* 2. Get geojson data and run a function to add it to a layer from step 1 | |
* 3. Create the function that will be run in step 2 | |
* 4. Create the list of layers that will appear in the control component | |
* 5. Create the control component | |
*/ |