ol

Source:
  • ol.jsdoc, line 1

Classes

ol.Attribution
ol.Collection
ol.DeviceOrientation
ol.Feature
ol.Geolocation
ol.Map
ol.MapEvent
ol.Object
ol.Overlay
ol.Projection
ol.View2D

Namespaces

ol.animation
ol.control
ol.expr
ol.geom
ol.layer
ol.parser
ol.proj
ol.source
ol.style
ol.tilegrid

Members

<static> inherits

ol.inherits is an alias to the goog.inherits function. It is exported for use in non-compiled application code. See ol.exports.

FIXME: We use a new line to fake the linter. Without the new line the linter complains with:

"Missing newline between constructor and goog.inherits"

Source:
  • ol.js, line 13

<static> OverlayPositioning :string

Properties:
Name Type Default Description
BOTTOM_LEFT string bottom-left
BOTTOM_RIGHT string bottom-right
TOP_LEFT string top-left
TOP_RIGHT string top-right
Source:
  • overlay.js, line 30

<static> ProjectionUnits :string

Properties:
Name Type Default Description
DEGREES string degrees
FEET string ft
METERS string m
Source:
  • proj.js, line 37

<static> RendererHint :string

Properties:
Name Type Default Description
CANVAS string canvas
DOM string dom
WEBGL string webgl
Source:
  • map.js, line 93

<static> Size

Source:
  • size.js, line 9

TypeDefs

Coordinate

An array representing a coordinate.

Source:
  • coordinate.js, line 14

CoordinateFormatType

Source:
  • coordinate.js, line 11

DeviceOrientationOptions

Properties:
Name Type Description
tracking boolean | undefined

Tracking.

Source:
  • objectliterals.jsdoc, line 1

GeolocationOptions

Properties:
Name Type Description
tracking boolean | undefined

Tracking.

trackingOptions GeolocationPositionOptions | undefined

Tracking options.

projection ol.ProjectionLike

Projection.

Source:
  • objectliterals.jsdoc, line 3

GetFeatureInfoOptions

Properties:
Name Type Description
pixel ol.Pixel

Pixel coordinate relative to the map viewport.

layers Array.<ol.layer.Layer> | undefined

Layers to restrict the query to. All map layers will be queried if not provided.

success function

Callback for successful queries. The passed argument is the resulting feature information for each layer, with array indices being the same as in the passed layers array or in the layer collection as returned from ol.Map#getLayers() if no layers were provided.

error function | undefined

Callback for unsuccessful queries. Note that queries with no matching features trigger the success callback, not the error callback.

Source:
  • objectliterals.jsdoc, line 5

GetFeaturesOptions

Properties:
Name Type Description
pixel ol.Pixel

Pixel coordinate relative to the map viewport.

layers Array.<ol.layer.Layer> | undefined

Layers to restrict the query to. All layers will be queried if not provided.

success function

Callback for successful queries. The passed argument is the resulting features for each layer, with array indices being the same as in the passed layers array or in the layer collection as returned from ol.Map#getLayers() if no layers were provided.

error function | undefined

Callback for unsuccessful queries. Note that queries with no matching features trigger the success callback, not the error callback.

Source:
  • objectliterals.jsdoc, line 7

MapOptions

Object literal with config options for the map.

Properties:
Name Type Description
controls ol.Collection | Array.<ol.control.Control> | undefined

Controls initially added to the map.

interactions ol.Collection | undefined

Interactions.

layers Array.<ol.layer.Layer> | ol.Collection | undefined

Layers.

renderer ol.RendererHint | undefined

Renderer.

renderers Array.<ol.RendererHint> | undefined

Renderers.

target Element | string | undefined

The container for the map.

view ol.IView | undefined

The map's view. Currently ol.View2D is available as view.

Source:
  • objectliterals.jsdoc, line 9

OverlayOptions

Object literal with config options for the overlay.

Properties:
Name Type Description
element Element | undefined

The overlay element.

map ol.Map | undefined

The map to overlay onto.

position ol.Coordinate | undefined

The overlay position in map projection.

positioning ol.OverlayPositioning | undefined

Positioning.

Source:
  • objectliterals.jsdoc, line 11

Proj4jsProjectionOptions

Object literal with config options for the Proj4js projection.

Properties:
Name Type Description
code string

The SRS identifier code, e.g. 'EPSG:31256'.

extent ol.Extent | undefined

The validity extent for the SRS.

global boolean | undefined

Whether the projection is valid for the whole globe. Default is false.

Source:
  • objectliterals.jsdoc, line 13

ProjectionLike

A projection as ol.Projection, SRS identifier string or undefined.

Source:
  • proj.js, line 27

ProjectionOptions

Object literal with config options for the projection.

Properties:
Name Type Description
code string

The SRS identifier code, e.g. 'EPSG:4326'.

units ol.ProjectionUnits

Units.

extent ol.Extent | undefined

The validity extent for the SRS.

axisOrientation string | undefined

The axis orientation as specified in Proj4. The default is 'enu'.

global boolean | undefined

Whether the projection is valid for the whole globe. Default is false.

Source:
  • objectliterals.jsdoc, line 15

Size

An array representing a size: [width, height].

Source:
  • size.js, line 5

TransformFunction

A transform function accepts an array of input coordinate values, an optional output array, and an optional dimension (default should be 2). The function transforms the input coordinate values, populates the output array, and returns the output array.

Source:
  • transformfunction.js, line 12

View2DOptions

Object literal with config options for the view.

Properties:
Name Type Description
center ol.Coordinate | undefined

The initial center for the view. The coordinate system for the center is specified with the projection option.

maxResolution number | undefined

The maximum resolution used to determine the resolution constraint. It is used together with maxZoom and zoomFactor. If unspecified it is calculated in such a way that the projection's validity extent fits in a 256x256 px tile. If the projection is Spherical Mercator (the default) then maxResolution defaults to 40075016.68557849 / 256 = 156543.03392804097.

maxZoom number | undefined

The maximum zoom level used to determine the resolution constraint. It is used together with maxResolution and zoomFactor. Default is 28.

projection ol.ProjectionLike

The projection. Default is EPSG:3857 (Spherical Mercator).

resolution number | undefined

The initial resolution for the view. The units are projection units per pixel (e.g. meters per pixel).

resolutions Array.<number> | undefined

Resolutions to determine the resolution constraint. If set the maxResolution, maxZoom and zoomFactor options are ignored.

rotation number | undefined

The initial rotation for the view in radians (positive rotation clockwise).

zoom number | undefined

Zoom level used to calculate the initial resolution for the view. The initial resolution is determined using the ol.View2D#constrainResolution method.

zoomFactor number | undefined

The zoom factor used to determine the resolution constraint. It is together with maxResolution and maxZoom. Default is 2.

Source:
  • objectliterals.jsdoc, line 17