Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ImageOverlay

Hierarchy

Implements

Index

Constructors

constructor

  • Instantiates an image overlay object given the URL of the image and the geographical bounds it is tied to.

    Parameters

    Returns ImageOverlay

Methods

addTo

  • Adds the overlay to the map.

    Parameters

    Returns ImageOverlay

bringToBack

  • Brings the layer to the bottom of all overlays.

    Returns ImageOverlay

bringToFront

  • Brings the layer to the top of all overlays.

    Returns ImageOverlay

onAdd

  • onAdd(map: Map): void
  • Should contain code that creates DOM elements for the overlay, adds them to map panes where they should belong and puts listeners on relevant map events. Called on map.addLayer(layer).

    Parameters

    Returns void

onRemove

  • onRemove(map: Map): void
  • Should contain all clean up code that removes the overlay's elements from the DOM and removes listeners previously added in onAdd. Called on map.removeLayer(layer).

    Parameters

    Returns void

setOpacity

  • Sets the opacity of the overlay.

    Parameters

    • opacity: number

    Returns ImageOverlay

setUrl

  • Changes the URL of the image.

    Parameters

    • imageUrl: string

    Returns ImageOverlay

Static addInitHook

  • addInitHook(methodName: string, ...args: any[]): void
  • You can also use the following shortcut when you just need to make one additional method call.

    Parameters

    • methodName: string
    • Rest ...args: any[]

    Returns void

Static extend

  • You use L.Class.extend to define new classes, but you can use the same method on any class to inherit from it.

    Parameters

    Returns any