Get started with ol3 CDN
BSD-2-Clause licensed
The ol3 library is a popular open-source JS mapping library for creating and working with interactive maps in the browser, using OpenLayers 3 technology.
Tags:- map
- openlayers
- maps
Stable version
Copied!
How to start using ol3 CDN
// Import OpenLayers library
const ol = document.createElement('script');
ol.src = 'https://cdn.cdnhub.io/ol3/4.6.5/ol.js';
document.head.appendChild(ol);
// Wait for OpenLayers to load
window.onload = function() {
// Create a map in the "map" div, set the view to a given center and zoom
const map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
],
view: new ol.View({
center: [0, 0],
zoom: 2
})
});
};
Copied!
Copied!
Copied!
Copied!
All versions
3.1.0
3.1.0-pre.2
3.1.0-pre.3
3.1.1
3.10.0
3.10.1
3.11.0
3.11.0-beta.1
3.11.0-beta.2
3.11.1
3.11.2
3.12.0
3.12.1
3.13.0
3.13.1
3.14.0
3.14.1
3.14.2
3.15.0
3.15.1
3.16.0
3.16.0-alpha.3
3.17.0
3.17.1
3.18.0
3.18.1
3.18.2
3.19.0
3.19.1
3.2.0
3.2.1
3.20.0
3.20.1
3.21.0-beta.1
3.21.0-beta.2
3.3.0
3.4.0
3.5.0
3.6.0
3.7.0
3.8.0
3.8.0-alpha.1
3.8.1
3.8.2
3.9.0
3.9.0-alpha.1
4.0.0
4.0.0-beta.1
4.0.1
4.1.0
4.1.1
4.1.2-beta.1
4.2.0
4.3.0
4.3.0-beta.2
4.3.0-beta.3
4.3.1
4.3.2
4.3.3
4.3.4
4.4.0
4.4.1
4.4.2
4.5.0
4.5.0-beta.1
4.6.0
4.6.0-beta.1
4.6.1
4.6.2
4.6.3
4.6.4
*** 4.6.5