The ol package

The recommended way to use OpenLayers is to work with the ol package.

To add OpenLayers to an existing project, install the latest with npm:

npm install ol

If you are starting a new project from scratch, see the quick start docs for more information.

Hosted build for development

If you want to try out OpenLayers without downloading anything (not recommended for production), include the following in the head of your html page:

<script src="https://cdn.jsdelivr.net/npm/ol@v9.1.0/dist/ol.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@v9.1.0/ol.css">

The full build of the library does not include all dependencies: the geotiff and ol-mapbox-style packages are omitted. If you use these, you'll need to add additional script tags.

Downloads for the v9.1.0 release

ArchiveDescription
v9.1.0-site.zip Includes examples and documentation.
v9.1.0-package.zip Includes sources and the full build of the library.

See the v9.1.0 release page for a changelog and any special upgrade notes.

For archives of previous releases, see the complete list of releases.