--- layout: api title: "v2.0.1 JavaScript Library: L.ImageOverlay" categories: api version: v2.0.1 permalink: /api/v2.0.1/l-imageoverlay ---

## ImageOverlay

Used to load and display a single image over specific bounds of the map, implements ILayer interface.

### Usage example

    var imageUrl = 'http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg',
    	imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];

    L.imageOverlay(imageUrl, imageBounds).addTo(map);

### Creation

Factory | Description
--- | ---
`L.ImageOverlay( <String> imageUrl, <LatLngBounds> bounds, <ImageOverlay options> options? )` | Instantiates an image overlay object given the URL of the image and the geographical bounds it is tied to.

### Options

Option | Type | Default | Description
--- | --- | --- | ---
`opacity` | `Number` | `1.0` | The opacity of the image overlay.
`attribution` | `String` | `''` | The attribution text of the image overlay.

### Methods

Method | Returns | Description
--- | --- | ---
`addTo( <Map> map )` | `this` | Adds the overlay to the map.
`setOpacity( <Number> opacity )` | `this` | Sets the opacity of the overlay.
`setUrl( <String> imageUrl )` | `this` | Changes the URL of the image.
`bringToFront()` | `this` | Brings the layer to the top of all overlays.
`bringToBack()` | `this` | Brings the layer to the bottom of all overlays.