Skip to content

Commit 7cb748b

Browse files
CommanderStormpre-commit-ci[bot]Copilot
authored
docs: minor tweaks to a few places (#2587)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 1425707 commit 7cb748b

File tree

9 files changed

+69
-75
lines changed

9 files changed

+69
-75
lines changed

docs/content/run-hosting-environment/index.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/content/run-with-nginx.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
You can run Martin behind NGINX proxy, so you can cache frequently accessed tiles with custom logic.
44
Here is an example `docker-compose.yml` file that runs Martin with NGINX and PostgreSQL.
55

6-
```yml
6+
```compose
77
--8<-- "files/compose.nginx.yaml"
88
```
99

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Reverse Proxies
22

3-
Martin can run without a reverse proxy.
3+
Martin **can run without** a reverse proxy.
44

55
Doing so has a few downsides:
66

@@ -9,7 +9,12 @@ Doing so has a few downsides:
99
This means anybody can point their dns record to your server and serve to all requests going to the port Martin is running on.
1010
Using a reverse proxy makes this abuse obvious.
1111
- Martin only supports a simple in-memory caching.
12-
If you need more advanced caching options, you can use a reverse proxy like [Nginx](https://nginx.org/), [Varnish](https://varnish-cache.org/), or [Apache](https://httpd.apache.org/) with custom rules.
13-
For example, you may choose to only cache zoom 0..10.
14-
- You may need to host more than just tiles at a single domain name.
15-
- Martin has a fixed public API, but your site may require a different structure, e.g. serving tiles with from a sub-path like `/tiles/source/z/x/y`.
12+
If you need more advanced caching options, you can use a reverse proxy with custom rules.
13+
You may for example only want to cache zoom `0..10`.
14+
Here are some reverse proxy options:
15+
- [Nginx](https://nginx.org/)
16+
- [Varnish](https://varnish-cache.org/)
17+
- [Apache](https://httpd.apache.org/)
18+
- You may need to host more than just tiles/resources on the domain name.
19+
- Martin has a fixed public API, but your site may require a different structure.
20+
For example, you may want to serve tiles from `/{sourceID}/tiles?z={z}&x={x}&y={y}` instead of `/{sourceID}/{z}/{x}/{y}`.

docs/content/sources-resources/index.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/content/using-with-leaflet.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ L.vectorGrid
1616
})
1717
.addTo(map);
1818
```
19+
20+
!!! warning
21+
Style serving is specific to [maplibre](https://maplibre.org/martin/using-with-maplibre/) or [deck.gl](https://maplibre.org/martin/using-with-deckgl/).

docs/content/using-with-openlayers.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ const layer = new VectorTileLayer({
1414
});
1515
map.addLayer(layer);
1616
```
17+
18+
!!! warning
19+
Style serving is specific to [maplibre](https://maplibre.org/martin/using-with-maplibre/) or [deck.gl](https://maplibre.org/martin/using-with-deck-gl/).

docs/content/using-with-renderer/index.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/content/using.md

Lines changed: 52 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -29,57 +29,10 @@ as `/points`, `/points.1`, etc.
2929
Some source IDs are reserved for internal use. If you try to use them, they will be automatically renamed to a unique ID
3030
the same way as duplicate source IDs are handled, e.g. a `catalog` source will become `catalog.1`.
3131

32-
Some of the reserved IDs: `_`, `catalog`, `config`, `font`, `health`, `help`, `index`, `manifest`, `metrics`, `refresh`,
32+
Here are the reserved source IDs:
33+
`_`, `catalog`, `config`, `font`, `health`, `help`, `index`, `manifest`, `metrics`, `refresh`,
3334
`reload`, `sprite`, `status`.
3435

35-
### Catalog
36-
37-
A list of all available sources is available via catalogue endpoint:
38-
39-
```bash
40-
curl localhost:3000/catalog | jq
41-
```
42-
43-
```yaml
44-
{
45-
"tiles" {
46-
"function_zxy_query": {
47-
"name": "public.function_zxy_query",
48-
"content_type": "application/x-protobuf"
49-
},
50-
"points1": {
51-
"name": "public.points1.geom",
52-
"content_type": "image/webp"
53-
},
54-
...
55-
},
56-
"sprites": {
57-
"cool_icons": {
58-
"images": [
59-
"bicycle",
60-
"bear",
61-
]
62-
},
63-
...
64-
},
65-
"fonts": {
66-
"Noto Mono Regular": {
67-
"family": "Noto Mono",
68-
"style": "Regular",
69-
"glyphs": 875,
70-
"start": 0,
71-
"end": 65533
72-
},
73-
...
74-
},
75-
"styles": {
76-
"maplibre_demo": {
77-
"path": "path/to/maplibre_demo.json",
78-
},
79-
},
80-
}
81-
```
82-
8336
### Source TileJSON
8437

8538
All tile sources have a [TileJSON](https://github.com/mapbox/tilejson-spec) endpoint available at the `/{SourceID}`.
@@ -91,3 +44,53 @@ and `lines` sources will be available at `/points,lines` endpoint.
9144
curl localhost:3000/points | jq
9245
curl localhost:3000/points,lines | jq
9346
```
47+
48+
### Catalog
49+
50+
A list of all available sources is available via catalogue endpoint
51+
52+
```bash
53+
curl localhost:3000/catalog | jq
54+
```
55+
56+
??? example "Example"
57+
58+
```yaml
59+
{
60+
"tiles" {
61+
"function_zxy_query": {
62+
"name": "public.function_zxy_query",
63+
"content_type": "application/x-protobuf"
64+
},
65+
"points1": {
66+
"name": "public.points1.geom",
67+
"content_type": "image/webp"
68+
},
69+
...
70+
},
71+
"sprites": {
72+
"cool_icons": {
73+
"images": [
74+
"bicycle",
75+
"bear",
76+
]
77+
},
78+
...
79+
},
80+
"fonts": {
81+
"Noto Mono Regular": {
82+
"family": "Noto Mono",
83+
"style": "Regular",
84+
"glyphs": 875,
85+
"start": 0,
86+
"end": 65533
87+
},
88+
...
89+
},
90+
"styles": {
91+
"maplibre_demo": {
92+
"path": "path/to/maplibre_demo.json",
93+
},
94+
},
95+
}
96+
```

zensical.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ nav = [
3838
{"Command Line Interface" = "run-with-cli.md"},
3939
{"Environment Variables" = "env-vars.md"},
4040
{"Hosting Environment-specific Guides" = [
41-
"run-hosting-environment/index.md",
4241
{"Docker" = "run-with-docker.md"},
4342
{"Docker Compose" = "run-with-docker-compose.md"},
4443
{"AWS Lambda" = "run-with-lambda.md"}
@@ -64,7 +63,6 @@ nav = [
6463
{"Composite Sources" = "sources-composite.md"}
6564
]},
6665
{"Supporting Resources" = [
67-
"sources-resources/index.md",
6866
{"Sprites" = "sources-sprites.md"},
6967
{"Styles" = "sources-styles.md"},
7068
{"Fonts" = "sources-fonts.md"}

0 commit comments

Comments
 (0)