Class

VenuesService

mapsindoors.services.VenuesService

Extends

  • Service

Methods

# async getBuilding(id, argsopt) → {Promise:.<Building:>}

Get a building by it's id.
Parameters:
Name Type Attributes Description
id string A building id
args Object <optional>
lr Object <optional>
Sets the preferred language that the result should be returned in.
Promise:.<Building:>
Examples
mapsindoors.services.VenuesService.getBuilding('5548c6583eb3c3080c4a92da').then(building => { ... });
mapsindoors.services.VenuesService.getBuilding('5548c6583eb3c3080c4a92da', { lr: 'en' }).then(building => { ... });

# async getBuildingInView(viewport, argsopt) → {Promise:.<string:>}

Gets the id of the current building in "focus"
Parameters:
Name Type Attributes Description
viewport Object Limits the result to inside the boundingbox. `{east: number, north: number, south: number, west: number}`
east number Max longitude of the bounds in degrees.
north number Max latitude of the bounds in degrees.
south number Min latitude of the bounds in degrees.
west number Min longitude of the bounds in degrees.
args Object <optional>
lr Object <optional>
Sets the preferred language that the result should be returned in.
- A building id.
Promise:.<string:>

# async getBuildings(venueIdopt) → {Promise:.<Array:.<Building:>>}

Get all buildings for the solution or limit the result to only buildings form a specific venue.
Parameters:
Name Type Attributes Default Description
venueId string <optional>
all A venue id to limit the result to.
Promise:.<Array:.<Building:>>
Examples
mapsindoors.services.VenuesService.getBuildings().then(buildings => { ... });
mapsindoors.services.VenuesService.getBuildings('550c286964617400a4100000').then(buildings => { ... });

# async getVenue(id) → {Promise:.<Venue:>}

Returns a Venue by its id.
Parameters:
Name Type Description
id string A venue id
Promise:.<Venue:>
Example
mapsindoors.services.VenuesService.getVenue('550c286964617400a4100000').then(venue => { ... });

# async getVenues() → {Promise:.<Array:.<Venue:>>}

Returns a list of all the venues for the current solution.
Promise:.<Array:.<Venue:>>
Example
mapsindoors.services.VenuesService.getVenues().then(venues => { ... });