1.6

Javascript reference
  1. IndoorRenderer class 
  2. IndoorService class 
  3. IndoorWidget class 
  4. Building object Specification 
  5. Feature object Specification 
  6. FeatureCollection object Specification 
  7. IndoorDirectionLeg object Specification 
  8. IndoorDirectionRequest object Specification 
  9. IndoorDirectionResult object Specification 
  10. IndoorDirectionRoute object Specification 
  11. IndoorDirectionsBounds object Specification 
  12. IndoorDistance object Specification 
  13. IndoorDuration object Specification 
  14. IndoorGeometryType object Specification 
  15. IndoorInstruction object Specification 
  16. IndoorPosition object Specification 
  17. IndoorRendererOptions object Specification 
  18. IndoorRendererOptionsIcon object Specification 
  19. IndoorStep object Specification 
  20. IndoorWidgetOptions object Specification 
  21. IndoorWidgetOptionsui object Specification 
  22. LatLngLevel object Specification 
  23. Level object Specification 
  24. PolylineCoords object Specification 
  25. Venue object Specification 
  26. VenuesResult object Specification 

IndoorRenderer class 🔗


woosmap.map.IndoorRenderer

Constructor
constructor(options?:IndoorRendererOptions)

Creates an Indoor renderer.


Methods
setMap(map:?woosmap.map.Map)

Sets the map where to render the Indoor map.

getLevel()

Return Value: Number

Get the displayed level.

getSelectedFeature()

Return Value: ?Feature

Get the selected feature.

getVenue()

Return Value: ?Venue

Get the displayed venue.

setDirections(directions:?IndoorDirectionResult, padding:?Number)

Call this function to draw a polyline on map.

highlightStep(stepToHighlight:?Feature)

Highlight the step of the directions

setUserLocation(lat:Number, lng:Number, level:Number, bearing:Number, forceFocus:Boolean)

Set the current user location. A blue dot is going to be displayed.

getUserLocation()

Return Value: IndoorPosition

Returns the current user location.

isUserInsideVenue(lat:Number, lng:Number)

Return Value: Boolean

Detects whether user location is found inside venue’s bounding box

setFloor(floor:Number)

Sets the floor for the venue

setVenue(venueId:String)

Renders map with the selected venue

highlightFeature(featureid:Number)

Renders a map with a POI highlighted by pk or id

highlightFeatureByRef(ref:String)

Renders a map with a POI highlighted by ref


Events
indoor_level_changed

This event is fired when the indoor level is changed

indoor_user_location

This event is fired when the indoor user location is changed

indoor_feature_selected

This event is fired when any indoor feature on the map is clicked


IndoorService class 🔗


woosmap.map.IndoorService

Methods
venues(callback:function(VenuesResult): void)

Retrieve all the venues

venue(venueId:String, callback:function(Venue): void)

Retrieve detailed venue data

search(venueId:String, query:String, limit:?Number, ref:?String, callback:function(FeatureCollection): any)

Search for features by their names

directions(request:IndoorDirectionRequest, callback:function(?IndoorDirectionResult): void)

Gets indoor directions

feature(venueId:String, featureId:Number, callback:function(Feature): void)

Gets feature by feature id


IndoorWidget class 🔗


woosmap.map.IndoorWidget

Constructor
constructor(widgetOptions?:IndoorWidgetOptions, rendererOptions?:IndoorRendererOptions)

Creates a new Indoor widget.


Methods
setMap(map:Map)

Sets the map where to render the Indoor.

setVenue(venueId:String)

Renders map with the selected venue

highlightFeature(id:Number)

Renders a map with a POI highlighted by pk / id

highlightFeatureByRef(ref:String)

Renders a map with a POI highlighted by its ref

setDirections(directions:?IndoorDirectionResult)

Call this function to draw a polyline on map.

setUnits(units:"imperial" | "metric")

Sets the distance units.

getUnits()

Return Value: "imperial" | "metric"

Gets the distance units.

setDirectionsMode(profile:String)
Sets the routing profile (or directions mode) (‘security’ ‘wheelchair’) for way finding
getDirectionsMode()

Return Value: ?String

Gets the distance units.

setUserLocation(lat:Number, lng:Number, level:Number, bearing?:Number, forceFocus:Boolean)

Sets the current user location.

setFloor(floor:Number)

Sets the floor for the venue

addListener(eventName:String, handler:any)

Return Value: MapEventListener

Adds a listener for eventName.


Building object Specification  🔗


Building of a venue.

Properties
ref Type: ?String
name Type: ?String
description Type: ?String
opening_hours Type: ?String
logo Type: ?String
cover Type: ?String
levels Type: Array<Level>

Feature object Specification  🔗


Feature

Properties
id Type: ?Number
properties Type: {}
geometry Type: {coordinates : any, type : IndoorGeometryType}

FeatureCollection object Specification  🔗


Collection of features

Properties
type Type: "FeatureCollection"
features Type: Array<Feature>

IndoorDirectionLeg object Specification  🔗


Indoor directions leg.

Properties
distance Type: IndoorDistance
duration Type: IndoorDuration
end_location Type: LatLngLevel
start_location Type: LatLngLevel
steps Type: Array<IndoorStep>

IndoorDirectionRequest object Specification  🔗


Request to get directions between an origin and a destination.

Properties
venueId Type: String
origin Type: LatLng
originLevel Type: Number
destination Type: LatLng
destinationLevel Type: Number
language Type: ?String
units Type: "metric" | "imperial"
mode Type: ?String

IndoorDirectionResult object Specification  🔗


Indoor directions result.

Properties
routes Type: Array<IndoorDirectionRoute>

IndoorDirectionRoute object Specification  🔗


Indoor directions route.

Properties
legs Type: Array<IndoorDirectionLeg>
bounds Type: IndoorDirectionsBounds

IndoorDirectionsBounds object Specification  🔗


This object specification extends Array<Number>.

Indoor directions bounds.

IndoorDistance object Specification  🔗


Indoor distance object.

Properties
value Type: Number
text Type: String

IndoorDuration object Specification  🔗


Indoor duration object.

Properties
value Type: Number
text Type: String

IndoorGeometryType object Specification  🔗


This object specification extends "Point" | "LineString" | "Polygon".

Type of Indoor geometry

IndoorInstruction object Specification  🔗


Indoor instrction object.

Properties
summary Type: String
instruction_type Type: String

IndoorPosition object Specification  🔗


Position indoor.

Properties
position Type: LatLngLiteral
level Type: Number
bearing Type: ?Number
forceFocus Type: ?Boolean

IndoorRendererOptions object Specification  🔗


Options to configure the Indoor Renderer.

Properties
centerMap Type: Boolean

Center the map on the venue when initializing.

defaultFloor Type: Number

Set default floor for the venue

venue Type: String

Set default venue

highlightPOI Type: Number

Renders map with a POI selected by pk or id

icon Type: IndoorRendererOptionsIcon

Sets custom icon for venue markers

highlightPOIByRef Type: String

Renders map with a POI selected by ref


IndoorRendererOptionsIcon object Specification  🔗


Icons to use to display venues on the map.

Properties
url Type: String
scaledSize Type: {height : Number, width : Number}
anchor Type: {x : Number, y : Number}

IndoorStep object Specification  🔗


Indoor directions step.

Properties
distance Type: IndoorDistance
duration Type: IndoorDuration
end_location Type: LatLngLevel
start_location Type: LatLngLevel
instruction Type: ?IndoorInstruction
polyline Type: PolylineCoords

IndoorWidgetOptions object Specification  🔗


Options of the Indoor widget.

Properties
ui Type: IndoorWidgetOptionsui

Set the custom colors of the indoor widget

units Type: "imperial" | "metric" | ""

Set units to use to show distance in directions itinerary

directionsMode Type: String

Set directions mode/routing profile


IndoorWidgetOptionsui object Specification  🔗


UI Option of the Indoor widget.

Properties
primaryColor Type: String
secondaryColor Type: String

LatLngLevel object Specification  🔗


Indoor location composed of a latitude, a longitude and a level.

Properties
lat Type: Number
lng Type: Number
level Type: Number

Level object Specification  🔗


Level of a Venue

Properties
name Type: ?String
level Type: Number
bbox Type: Array<Number>

PolylineCoords object Specification  🔗


This object specification extends Array<ArrayType>.

Array of lat, lon coordinates.

Venue object Specification  🔗


Venue

Properties
name Type: ?String
levels Type: Array<Level>
bbox Type: Array<Number>
venue_id Type: String
buildings Type: ?Array<Building>
routing_profiles Type: ?Array<String>
categories Type: ?Array<String>

VenuesResult object Specification  🔗


List of venues.

Properties
venues Type: Array<Venue>

Was this article helpful?
Have more questions? Submit a request