OpenLayers 2 is outdated. Go to the latest 3.x version:

Example code

The primary source of documentation for the library is our


In general, our examples are routinely checked for problems, and are included in every download of OpenLayers, which helps keep them up to date and in line with current code. We try to make sure that all new functionality is covered by at least one example.

Using the search box on the examples page will let you find examples about what you're looking for relatively easily, if any are available.

This page also lists other sources of documentation, so browsing it may help you find what you're looking for.


OpenLayers has begun maintaining a set of prose documentation. Currently, it is minimal, but in the long term, most stable wiki documentation should be migrated into this website.


If you have a question you want to see answered, it may be available from our FAQ.

OpenLayers JavaScript API Documentation

Automatically generated API documentation is available:

See Natural Docs conventions if you are contributing code.

Note on API Stability:

There are two types of properties/methods in the OpenLayers code: One set is the set of API Methods and properties. There are also additional internal properties which are not exposed to the API. Javascript does not have private members, so there is no technical limitation to using these non-documented methods in Application code. However, while we make every effort not to change APIs between releases, methods and properties which are not explicitly declared as API Methods may change in minor releases.

The documentation above only includes the API Methods. Full developer/internal library documentation is also available below, but methods which are not available in the API documentation above can not be depended upon to stay the same between releases. If you use methods included in these docs, you may have to make modifications in your application code to run between minor releases of OpenLayers.

Before Getting Started -- The Technologies Behind OpenLayers

We at OpenLayers generally assume that everyone who comes to us is already a highly skilled web programmer. Such, however, is not always the case. Here we have assembled a few quick links to tutorials and the like on how to master the art of coding in JavaScript, debug in Firebug, understand JSON, etc.

Other OpenLayers Documentation

International Documentation


Russian / Русский

  • User Guide - Руководство пользователя


Last modified 8 months ago Last modified on May 19, 2016 11:41:43 PM