-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.qmd
More file actions
58 lines (42 loc) · 1.11 KB
/
index.qmd
File metadata and controls
58 lines (42 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
title: "maplibre"
format: html
editor: visual
---
## Quarto
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
## Running Code
When you click the **Render** button a document will be generated that includes both content and the output of embedded code. You can embed code like this:
```{r}
1 + 1
```
You can add options to executable code like this
```
#| echo: false
2 * 2
```
The `echo: false` option disables the printing of code (only output is displayed).
```{python}
import maplibre
import webbrowser
from maplibre import Layer, LayerType, Map, MapOptions
from maplibre.sources import GeoJSONSource
vancouver_blocks = GeoJSONSource(
data="https://raw.githubusercontent.com/visgl/deck.gl-data/master/examples/geojson/vancouver-blocks.json",
)
map_options = MapOptions(
center=(-123.1256, 49.24658),
zoom=12,
hash=True,
pitch=35,
)
m = Map(map_options)
m.add_layer(
Layer(
type=LayerType.LINE,
source=vancouver_blocks,
paint={"line-color": "white"},
)
)
m
```