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 floorSelector = document.createElement('div');
new mapsindoors.FloorSelector(floorSelector, mapsIndoors);

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

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