MapContext.moveToLocation

Display the pinned location at the center of the map and restore the default zoom level. Use this API together with the show-location method of the map component.

Sample code

copy
this.mapCtx = my.createMapContext('map');
this.mapCtx.moveToLocation();

Error code

Error code

Error message

Further action

2

Invalid parameters

Ensure that all parameters are specified correctly.

6000

Location permission denied.

Please check whether your location access is enabled.