BaseMapSelector Class
Populates the BasemapGallery widget located in the maps toolbar with items found in the application configuration. This module also handles all the event needed to change the map basemap and update the UI
Uses RAMP Templates:
templates/basemap_selector_template.json
Imports RAMP Modules:
GlobalStorage
Map
EventManager
Dictionary
PopupManager
Util
TmplHelper
Item Index
Methods
Methods
init
()
Object
private
Initiates additional UI components of the widget, setting listeners and registering the popup functionality
Returns:
Object:
itself
initListeners
()
private
Initializes class listeners.
initTopics
()
private
Initializes functions that publish events.
selectBasemap
(
private
-
basemapId
-
tileSchema
Selects a basemap in the basemapgallery based on the supplied basemap id. If the tileShema is different from the current one, reload the page.
Events
BaseMapSelector.BASEMAP_CHANGED
Fires whenever the basemap changes
BaseMapSelector.TOGGLE [subscribed]
Changes the selected basemap