Platform
Resources
Pricing
Sign in
Get started
jimmyg
Workspace
Fork
Published
By
jimmyg
Edited
Sep 9, 2021
Fork of
Maplibre Observable Demo
Insert cell
Insert cell
viewof
source
=
html
`<input type=file accept=".js">`
Insert cell
maplibregl
=
require
(
URL
.
createObjectURL
(
source
)
)
Insert cell
map
=
{
const
container
=
html
`<div id="map" style="width:600px; height: 600px"></div>`
var
map
=
new
maplibregl
.
Map
(
{
container
:
container
,
style
:
'https://demotiles.maplibre.org/style.json'
,
// style URL
center
:
[
0
,
0
]
,
// starting position [lng, lat]
zoom
:
1
// starting zoom
}
)
;
return
container
}
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
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
source
Add comment
Copy import
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