API
Table of Contents
LevelControl
Extends Control
A control to display the available levels
Parameters
-
indoorEqual
IndoorEqual the IndoorEqual instance -
options
Object (optional, default{}
)-
options.target
string? 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
-
map
Object the OpenLayers instance of the map -
options
Object (optional, default{}
)-
options.defaultStyle
boolean? False to not set the default style. Default true. -
options.spriteBaseUrl
string? The base url of the sprite (without .json or .png). If not set, no sprite will be used in the default style. -
options.url
string? Override the default tiles URL (https://tiles.indoorequal.org/). -
options.apiKey
string? The API key if you use the default tile URL (get your free key at indoorequal.com). -
options.heatmap
boolean? 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
-
styleFunction
function the style function
setHeatmapVisible
Change the heatmap layer visibility
Parameters
-
visible
boolean 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