Map Interaction
setAreaMap(areaId) -> {void}
Set area map
Parameters
Name | Data Type | Description |
---|---|---|
areaId |
string | Map area ID |
Return Value
none
Example
setMapCenter(coordinates) -> {void}
Set the map center point
Parameters
Name | Data Type | Description |
---|---|---|
coordinates |
array |
center point coordinates [x, y] Unit: meters |
Return Value
none
Example
zoomTo(zoom) -> {void}
Set the map zoom level
Parameters
Name | Data Type | Description |
---|---|---|
zoom |
number | The zoom level of the map, the value range is 0~22 |
Return Value
none
Example
fly(coordinates) -> {void}
map fly to a point
Parameters
Name | Data Type | Description |
---|---|---|
coordinates |
array |
target point coordinates [x, y] Unit: meters |
Return Value
none
Example
getCurrentPointPosition(featureId) -> {object}
Get the currently selected point pose
Parameters
Name | Data Type | Description |
---|---|---|
featureId |
string | point identifier |
Return Value object
pose information
x
- coordinate x componenty
- the y component of the coordinateyaw
- heading angle
Example
JavaScript | |
---|---|
getFeature(id) -> {object}
Get feature information by ID
Parameters
Name | Data Type | Description |
---|---|---|
id |
string | feature identifier |
Return Value object
feature information; structure reference https://geojson.org/
Example
getPlaceList() -> {any}
Get all location points
Parameters
none
Return Value any
List of location points; structure reference https://geojson.org/
Example
setClickMapCallback(callback) -> {void}
Set the click map callback method
Parameters
Name | Data Type | Description |
---|---|---|
callback |
function | callback method |
Return Value
none
Example
JavaScript | |
---|---|
setSelectedFeatures(featureId) -> {void}
Select the feature in the map based on the ID
Parameters
Name | Data Type | Description |
---|---|---|
featureId |
string | feature ID, multiple feature IDs are separated by commas |
Return Value
none