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
|
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. |
# 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 | Description |
|---|---|---|---|
venueId |
string
|
<optional> |
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 getVenueByName(name) → {Venue}
Get a venue by name.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string
|
The name of the venue. |
Example
mapsindoors.services.VenuesService.getVenueByName('My Venue');
# async getVenueList() → {Promise:.<Array:.<{id:: string:, name:: string:, displayName:: string:}>>}
Returns a light list of all venues for the current solution.
name is the internal venue identifier used for SDK comparisons.
displayName is the localized user-facing name from venueInfo, falling back to name.
Example
mapsindoors.services.VenuesService.getVenueList().then(venues => { ... });
# 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 => { ... });
# async resolveIdFromCoordinates(coordinates) → {Promise:.<(string:|null:)>}
Resolves a venue object id from coordinates inside a venue polygon. When multiple venue polygons contain the point, the smallest polygon wins.
Parameters:
| Name | Type | Description |
|---|---|---|
coordinates |
Object
|
# async resolveIdFromReference(venueReference) → {Promise:.<(string:|null:)>}
Resolves a venue reference (name, administrative id, or backend id) to a venue object id.
Parameters:
| Name | Type | Description |
|---|---|---|
venueReference |
string
|
Example
mapsindoors.services.VenuesService.resolveIdFromReference('MY_VENUE').then(venueId => { ... });