Published
Edited
May 23, 2018
8 forks
13 stars
Insert cell
Insert cell
Insert cell
map.getTargetElement()
Insert cell
Insert cell
ol = require('openlayers@4')
Insert cell
Insert cell
html`<link href='https://unpkg.com/openlayers@4.6.5/css/ol.css' rel='stylesheet' />`
Insert cell
Insert cell
map = {
let map = new ol.Map({
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
],
target: html`<div style='height:500px;'></div>`,
view: new ol.View({
center: ol.proj.fromLonLat([-77.41, 37.5]),
zoom: 10
})
});
setTimeout(() => map.updateSize(), 1);
return map;
}
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more