Deep Map SDK Web
This Tutorial will show you how you can switch between the levels of your map.
Step 1: Populate level list
After creating a map, as outlined in "A Map Application", you can populate the level list using the following callback:
This fillLevelSwitch method looks like this:
- We get the levels from the map
- Extract the keys
- Iterate over the keys if there is more than one level
- Append a HTML-element option to the select box
Step 2: Create level switch element and select function
Now we update the HTML and Style
We must now define the switchLevel method, which handles the onchange event on the select element.
That's it! We are done with our level switcher.