This function is used internally by writeMap to generate JavaScript code related to the user interface.
writeMap
uiJS(interface, ar)
interface
an ui object created with ui.
ui
ar
a list of basemap and spl objects.
basemap
spl