In [ ]:
import jm
In [ ]:
gj = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"popup": "<h1>Wazzap</h1>",
"fill-opacity": 0.5,
"fill-color": "#FF0000",
"fill-outline-color": "#000000"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-78.94775390625,
40.613952441166596
],
[
-76.0693359375,
41.21172151054787
],
[
-75.30029296875,
42.342305278572816
],
[
-78.77197265625,
42.45588764197166
],
[
-78.94775390625,
40.613952441166596
]
]
]
}
}
]
}
In [ ]:
jm.init(MAPBOX_GL_JS_ACCESS_TOKEN)
In [ ]:
jm.gj(gj, popup="popup")
In [ ]:
m = jm.Map()
m
In [ ]:
s = jm.sources.GeoJSON(gj)
m.add_layer(jm.layers.Fill(s, popup="popup"))
In [ ]:
m.set_camera(center=[-76, 42], zoom=8, bearing=180, pitch=45, animate=5000)