API
Table of Contents
LevelControl
Extends Control
A control to display the available levels
Parameters
-
indoorEqualIndoorEqual the IndoorEqual instance -
optionsObject (optional, default)-
options.targetstring? Specify a target if you want the control to be rendered outside of the map's viewport.
-
Returns LevelControl
this
IndoorEqual
Extends BaseObject
Load the indoor= source and layers in your map.
Parameters
-
mapObject the OpenLayers instance of the map -
optionsObject (optional, default)-
options.defaultStyleboolean? False to not set the default style. Default true. -
options.spriteBaseUrlstring? The base url of the sprite (without .json or .png). If not set, no sprite will be used in the default style. -
options.urlstring? Override the default tiles URL (https://tiles.indoorequal.org/). -
options.apiKeystring? The API key if you use the default tile URL (get your free key at indoorequal.com). -
options.heatmapboolean? Should the heatmap layer be visible at start (true : visible, false : hidden). Defaults to true/visible.
-
Returns IndoorEqual
this
setStyle
Set the style for displayed features. This function takes a feature and resolution and returns an array of styles. If set to null, the layer has no style (a null style), so only features that have their own styles will be rendered in the layer. Call setStyle() without arguments to reset to the default style. See module:ol/style for information on the default style.
Parameters
-
styleFunctionfunction the style function
setHeatmapVisible
Change the heatmap layer visibility
Parameters
-
visibleboolean True to make it visible, false to hide it
IndoorEqual#change:levels
Emitted when the list of available levels has been updated
Type: Array
IndoorEqual#change:level
Emitted when the current level has been updated
Type: string