# MapContext.moveToLocation(Object object)
Start from base library version 1.2.0. Please remaining backward compatible.
with Promise style call: Not supported
Mini Program plugin: Support
To move the map center to the current anchor point, you need to set up a map component show-location For true.ƈ.8.0' Supports moving the center of the map to a specified location.
# parameter
# Object object
attribute | type | Default values | Required | Introductions | Minimum version |
---|---|---|---|---|---|
longitude | number | no | longitude | 2.8.0 | |
latitude | number | no | latitude | 2.8.0 | |
success | function | no | Interface calls the successful callback function | ||
fail | function | no | Interface calls failed callback functions | ||
complete | function | no | Callback function at the end of an interface call (both successful and unsuccessful calls are executed) |
The translations are provided by WeChat Translation and are for reference only. In case of any inconsistency and discrepancy between the Chinese version and the English version, the Chinese version shall prevail.Incorrect translation. Tap to report.