- LocationEditor#event:name_changed - Dispatched when the name of the location is changed.
- LocationEditor#event:description_changed - Dispatched when the description of the location is changed.
- LocationEditor#event:type_changed - Dispatched when the type of the location is changed.
Classes
Members
Methods
# getDescription(language) → {string}
Gets the description of the location for a specific language.
Parameters:
Name | Type | Description |
---|---|---|
language |
string
|
The language code. |
The description of the location in the specified language.
string
# getName(language) → {string}
Gets the name of the location for a specific language.
Parameters:
Name | Type | Description |
---|---|---|
language |
string
|
The language code. |
The name of the location in the specified language.
string
# move(distance, direction) → {LocationEditor}
Moves the location by the specified distance in the given direction.
Parameters:
Name | Type | Description |
---|---|---|
distance |
number
|
The distance to move in meters. |
direction |
number
|
The direction to move in degrees. Measured clockwise from true north. |
The current instance of LocationEditor.
# moveTo(args) → {LocationEditor}
Moves the location to the specified coordinates relative to the anchor point.
Parameters:
Name | Type | Description |
---|---|---|
args |
object
|
The coordinates of the new location. |
lat |
number
|
The latitude of the new location. |
lng |
number
|
The longitude of the new location. |
The current instance of LocationEditor.
# off(type, callback)
Removes an event listener from the event target.
Parameters:
Name | Type | Description |
---|---|---|
type |
string
|
The type of the event to remove the listener from. |
callback |
EventListener
|
The listener to remove. |
# on(type, callback)
Registers an event listener for the specified event type.
Parameters:
Name | Type | Description |
---|---|---|
type |
string
|
The type of the event to listen for. |
callback |
EventListener
|
The function to be called when the event is triggered. |
# once(type, callback)
Registers an event listener that will be invoked at most once after being added.
Parameters:
Name | Type | Description |
---|---|---|
type |
string
|
The type of the event to listen for. |
callback |
EventListener
|
The function to be called when the event is triggered. |
# rotate(angle) → {LocationEditor}
Rotates the location by the specified angle.
Parameters:
Name | Type | Description |
---|---|---|
angle |
number
|
The angle to rotate the location by in degrees. Measured clockwise from true north. |
The current instance of LocationEditor.
# async save() → {Promise.<void>}
Saves the location changes.
A promise that resolves when the location changes have been saved.
Promise.<void>
# setDescription(language, description) → {LocationEditor}
Sets the description of the location for a specific language.
Parameters:
Name | Type | Description |
---|---|---|
language |
string
|
The language code. |
description |
string
|
The description to set. |
If the language is unknown.
Error
The current instance of LocationEditor.
# setName(language, name) → {LocationEditor}
Sets the name of the location for a specific language.
Parameters:
Name | Type | Description |
---|---|---|
language |
string
|
The language code. |
name |
string
|
The name to set. |
If the language is unknown.
Error
The current instance of LocationEditor.
# setType(type) → {LocationEditor}
Sets the type of the location.
Parameters:
Name | Type | Description |
---|---|---|
type |
string
|
The type to set. |
If the type is unknown.
Error
The current instance of LocationEditor.
# toGeoJSON() → {GeoJSON.Feature}
Converts the location data to GeoJSON format.
The location data in GeoJSON format.
GeoJSON.Feature
# static create(location, owner, locationService, mapsIndoorsopt) → {LocationEditor}
Creates a new instance of LocationEditor.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
location |
LocationDataModel
|
The location data. |
|
owner |
SolutionManager
|
The owner SolutionManager instance. |
|
locationService |
LocationService
|
The location service instance. |
|
mapsIndoors |
mapsindoors.MapsIndoors
|
<optional> |
An optional instance of the MapsIndoors SDK. |
If the owner is not an instance of SolutionManager.
Error
If the locationService is not an instance of LocationService.
Error
A new instance of LocationEditor.