API

Table of Contents

IndoorEqual

Load the indoor= source and layers in your map.

Parameters

Properties

  • level string The current level displayed
  • levels array The levels that can be displayed in the current view

Returns IndoorEqual this

on

Add an event listener

Parameters
  • name string the name of the event
  • fn function the function to be called when the event is emitted

off

Remove an event listener.

Parameters
  • name string the name of the event
  • fn function the same function when on() was called

onAdd

Add the level control to the map Used when adding the control via the map instance: map.addControl(indoorEqual)

onRemove

Remove the level control Used when removing the control via the map instance: map.removeControl(indoorEqual)

setLevel

Set the displayed level.

Parameters
  • level string the level to be displayed

updateLevel

Set the displayed level.

Parameters
  • level string the level to be displayed

Meta

  • deprecated: Use setLevel instead

loadSprite

Load a sprite and add all images to the map

Parameters
  • baseUrl string the baseUrl where to load the sprite

  • options object (optional, default {})

    • options.update boolean? Update existing image (default false)

Returns Promise It resolves an hash of images.

setHeatmapVisible

Change the heatmap layer visibility

Parameters
  • visible boolean True to make it visible, false to hide it

IndoorEqual#levelschange

Emitted when the list of available levels has been updated

Type: array

IndoorEqual#levelchange

Emitted when the current level has been updated

Type: string