Index

MapViewLayers

A map is made of layers, a view to visualize them, interactions to modify map content and controls with UI components.

Overview
Creation
Events

The view manages the visual parameters of the map view, like resolution or rotation.

ol.View with center, projection, resolution and rotation

Layers are lightweight containers that get their data from sources.

ol.layer.Tile
ol.layer.Image
ol.layer.Vector
ol.layer.VectorTile
ControlsInteractionsSources and formats
Map default controls
All controls
Map default interactions
Interactions for vector features All interactions
Tile sources for ol.layer.Tile
Image sources for ol.layer.Image
Vector sources for ol.layer.Vector
Vector tile sources for ol.layer.VectorTile
Formats for reading/writing vector data
ol.format.WMSCapabilities
ProjectionsObservable objectsOther components

All coordinates and extents need to be provided in view projection (default: EPSG:3857). To transform, use ol.proj.transform() and ol.proj.transformExtent().

ol.proj

Changes to all ol.Objects can observed by calling the object.on('propertychange') method. Listeners receive an ol.ObjectEvent with information on the changed property and old value.

ol.DeviceOrientation
ol.Geolocation
ol.Overlay

 

API change policy

The OpenLayers 3.x API consists of

  • names of classes, class methods and properties
  • names of static functions and constants
  • order and types of function arguments
  • types of function return values

API elements marked as experimental provide stable and functioning code, but may change. Any changes will be documented in upgrade notes so application code can be changed appropriately before using the new version of the library. All other API elements will remain compatible throughout the 3.x releases so that no changes to existing application code are necessary when upgrading to a later version.

Note: The API change policy does not cover CSS class names that are used to theme the OpenLayers UI.

Note for Closure Compiler users compiling their application code together with OpenLayers: The names of types other than those in the list above (e.g. ol.Pixel) are subject to change. It is therefore recommended to either use the resolved type as listed in the API docs (e.g. Array.<number> instead of ol.Pixel), or pay attention to the upgrade notes, which will list the changes for those types.