# MapContext.addGroundOverlay(Object object)

Start from base library version 2.14.0. Please remaining backward compatible.

with Promise style call: Not supported

Mini Program plugin: Support

Create a custom image layer and the image will be scaled as the map is scaled.

# parameter

# Object object

attribute type Default values Required Introductions
id String yes Picture layer id
src String yes Picture path, support network picture, temporary path, code package path
bounds Object yes Latitude and longitude coverage of the picture
visible Boolean true no Whether visible
zIndex Number 1 no Layer Drawing Order
opacity Number 1 no Layer transparency
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.bounds Structure

attribute type Default values Required Introductions
southwest Object yes South-west latitude and longitude
northeast Object yes Northeast longitude and latitude

southwest Structure

attribute type Default values Required Introductions
longitude number yes longitude
latitude number yes latitude

northeast Structure

attribute type Default values Required Introductions
longitude number yes longitude
latitude number yes latitude