Notebooks 2.0 is here.
Read the preview announcement
Platform
Resources
Pricing
Sign in
Get started
jimmyg
Workspace
Fork
Published
By
jimmyg
Edited
Sep 14, 2021
1 fork
2 stars
Insert cell
Insert cell
// Broken in Safari:
maplibregl
=
require
(
"maplibre-gl@2.0.0-pre.1"
)
// Working:
// maplibregl = await require("maplibre-gl@1.15.2")
// maplibregl = await require("maplibre-gl@2.0.0-pre.3")
Insert cell
map
=
{
const
container
=
html
`<div id="map" style="width:600px; height: 600px"></div>`
;
yield
container
;
var
map
=
new
maplibregl
.
Map
(
{
container
,
style
:
"https://demotiles.maplibre.org/style.json"
,
// style URL
center
:
[
0
,
0
]
,
// starting position [lng, lat]
zoom
:
1
// starting zoom
}
)
;
}
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
maplibregl
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
map
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML