Class: Static

ol/source/ImageStatic~Static


import Static from 'ol/source/ImageStatic';

A layer source for displaying a single, static image.

new Static(options)

source/ImageStatic.js, line 36
Name Type Description
options

ImageStatic options.

Name Type Description
attributions module:ol/source/Source~AttributionLike

Attributions.

crossOrigin null | string

The crossOrigin attribute for loaded images. Note that you must provide a crossOrigin value if you are using the WebGL renderer or if you want to access pixel data with the Canvas renderer. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.

imageExtent module:ol/extent~Extent

Extent of the image in map coordinates. This is the [left, bottom, right, top] map coordinates of your image.

imageLoadFunction module:ol/Image~LoadFunction

Optional function to load an image given a URL.

projection module:ol/proj~ProjectionLike

Projection.

imageSize module:ol/size~Size

Size of the image in pixels. Usually the image size is auto-detected, so this only needs to be set if auto-detection fails for some reason.

url string

Image URL.

Fires:

Extends

Methods

changed() inherited

Observable.js, line 36

Increases the revision counter and dispatches a 'change' event.

get(key){*} inherited

Object.js, line 119

Gets a value.

Name Type Description
key string

Key name.

Returns:
Value.

getImageExtent(){module:ol/extent~Extent}

source/ImageStatic.js, line 87

Returns the image extent

Returns:
image extent.

getKeys(){Array.<string>} inherited

Object.js, line 132

Get a list of object property names.

Returns:
List of property names.

getProjection(){module:ol/proj/Projection~Projection} inherited

source/Source.js, line 119

Get the projection of the source.

Returns:
Projection.

getProperties(){Object.<string, *>} inherited

Object.js, line 141

Get an object of all property names and values.

Returns:
Object.

getRevision(){number} inherited

Observable.js, line 47

Get the version number for this object. Each time the object is modified, its version number will be incremented.

Returns:
Revision.

getState(){module:ol/source/State} inherited

source/Source.js, line 136

Get the state of the source, see module:ol/source/State~State for possible states.

Returns:
State.

getUrl(){string}

source/ImageStatic.js, line 106

Return the URL used for this image source.

Returns:
URL.

on(type, listener){module:ol/events~EventsKey|Array.<module:ol/events~EventsKey>} inherited

Observable.js, line 60

Listen for a certain type of event.

Name Type Description
type string | Array.<string>

The event type or array of event types.

listener function

The listener function.

Returns:
Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.

once(type, listener){module:ol/events~EventsKey|Array.<module:ol/events~EventsKey>} inherited

Observable.js, line 82

Listen once for a certain type of event.

Name Type Description
type string | Array.<string>

The event type or array of event types.

listener function

The listener function.

Returns:
Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.

refresh() inherited

source/Source.js, line 151

Refreshes the source and finally dispatches a 'change' event.

set(key, value, opt_silent) inherited

Object.js, line 164

Sets a value.

Name Type Description
key string

Key name.

value *

Value.

silent boolean

Update without triggering an event.

setAttributions(attributions) inherited

source/Source.js, line 162

Set the attributions of the source.

Name Type Description
attributions module:ol/source/Source~AttributionLike | undefined

Attributions. Can be passed as string, Array<string>, module:ol/source/Source&tilde;Attribution, or undefined.

setProperties(values, opt_silent) inherited

Object.js, line 183

Sets a collection of key-value pairs. Note that this changes any existing properties and adds new ones (it does not remove any existing properties).

Name Type Description
values Object.<string, *>

Values.

silent boolean

Update without triggering an event.

un(type, listener) inherited

Observable.js, line 101

Unlisten for a certain type of event.

Name Type Description
type string | Array.<string>

The event type or array of event types.

listener function

The listener function.

unset(key, opt_silent) inherited

Object.js, line 195

Unsets a property.

Name Type Description
key string

Key name.

silent boolean

Unset without triggering an event.