Class

FloorSelector

FloorSelector(element, mapsIndoors)

Constructor

# new FloorSelector(element, mapsIndoors)

Creates a new instance of the FloorSelector.
Parameters:
Name Type Description
element HTMLDivElement A container element the floor selector.
mapsIndoors MapsIndoors MapsIndoors instance.
Examples
//How to add a floor selector to Google Maps
const floorSelectorDiv = document.createElement('div');
new mapsindoors.FloorSelector(floorSelectorDiv, mapsIndoors);

const googleMap = mapView.getMap();
googleMap.controls[google.maps.ControlPosition.RIGHT_TOP].push(floorSelectorDiv);
//How to add a floor selector to Mapbox
const floorSelectorDiv = document.createElement('div');
new mapsindoors.FloorSelector(floorSelectorDiv, mapsIndoors);

const mapBox = mapView.getMap();
mapBox.addControl({ onAdd: function () { return floorSelectorDiv }, onRemove: function () { } });