# MapContext.getCenterLocation(Object object)
with Promise style call: Not supported
Mini Program plugin: Support
Gets the latitude and longitude of the current map center. And the return is gcj02 Coordinate systems, which can be used wx.openLocation()
# parameter
# Object object
attribute | type | Default values | Required | Introductions |
---|---|---|---|---|
iconPath | string | no | Icon path, support network path, local path, code package path | |
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) |
# object.success callback
# parameter
# Object res
attribute | type | Introductions |
---|---|---|
longitude | number | longitude |
latitude | number | latitude |