ImageLayer.js

ImageLayer()


constructor
Inherits from BaseLayer

ImageLayer class is responsible for adding images on the map

Options:
  • opacity(Number)The opacity of the layer. Values from 0 to 1 (Default: 1)
Events:
  • image-loadThe image was loaded
  • image-loadingThe image is currently loading
  • image-errorThe image couldn't be loaded
Parameter Type Description
url String The URL to the image
bounds LatLngBounds The bounds on which the image will be displayed
options Object The ImageLayer's options

reload()


method

Changes the layer's image and bounds

Parameter Type Description
url String The new URL of the image
bounds LatLngBounds The bounds on which the image will be displayed

setOpacity()


method

Sets the layers opacity

Parameter Type Description
opacity Number The new opacity of the layer. Values from 0 to 1