fix font docs

This commit is contained in:
Yuri Astrakhan 2023-10-30 18:18:03 -04:00
parent 163b44982a
commit 127c989f37
2 changed files with 44 additions and 21 deletions

View File

@ -86,20 +86,22 @@ docker run -p 3000:3000 \
```
## API
_See [API documentation](https://maplibre.org/martin/40-using.html) in the Martin book._
_See [API documentation](https://maplibre.org/martin/40-using-endpoints.html) in the Martin book._
Martin data is available via the HTTP `GET` endpoints:
| URL | Description |
|----------------------------------------|-----------------------------------------------|
| `/` | Status text, that will eventually show web UI |
| `/catalog` | List of all sources |
| `/{sourceID}` | Source TileJSON |
| `/{sourceID}/{z}/{x}/{y}` | Map Tiles |
| `/{source1},...,{sourceN}` | Composite Source TileJSON |
| `/{source1},...,{sourceN}/{z}/{x}/{y}` | Composite Source Tiles |
| `/sprite/{spriteID}[@2x].{json,png}` | Sprites (low and high DPI, index/png) |
| `/health` | Martin server health check: returns 200 `OK` |
| URL | Description |
|-----------------------------------------|-----------------------------------------------|
| `/` | Status text, that will eventually show web UI |
| `/catalog` | List of all sources |
| `/{sourceID}` | Source TileJSON |
| `/{sourceID}/{z}/{x}/{y}` | Map Tiles |
| `/{source1},…,{sourceN}` | Composite Source TileJSON |
| `/{source1},…,{sourceN}/{z}/{x}/{y}` | Composite Source Tiles |
| `/sprite/{spriteID}[@2x].{json,png}` | Sprites (low and high DPI, index/png) |
| `/font/{font}/{start}-{end}` | Font source |
| `/font/{font1},…,{fontN}/{start}-{end}` | Composite Font source |
| `/health` | Martin server health check: returns 200 `OK` |
## Documentation
See [Martin book](https://maplibre.org/martin/) for complete documentation.

View File

@ -2,16 +2,18 @@
Martin data is available via the HTTP `GET` endpoints:
| URL | Description |
|----------------------------------------|------------------------------------------------|
| `/` | Status text, that will eventually show web UI |
| `/catalog` | [List of all sources](#catalog) |
| `/{sourceID}` | [Source TileJSON](#source-tilejson) |
| `/{sourceID}/{z}/{x}/{y}` | Map Tiles |
| `/{source1},...,{sourceN}` | [Composite Source TileJSON](#source-tilejson) |
| `/{source1},...,{sourceN}/{z}/{x}/{y}` | [Composite Source Tiles](30-config-file.md) |
| `/sprite/{spriteID}[@2x].{json,png}` | [Sprite sources](36-sources-spritess.md) |
| `/health` | Martin server health check: returns 200 `OK` |
| URL | Description |
|-----------------------------------------|-----------------------------------------------|
| `/` | Status text, that will eventually show web UI |
| `/catalog` | [List of all sources](#catalog) |
| `/{sourceID}` | [Source TileJSON](#source-tilejson) |
| `/{sourceID}/{z}/{x}/{y}` | Map Tiles |
| `/{source1},…,{sourceN}` | [Composite Source TileJSON](#source-tilejson) |
| `/{source1},…,{sourceN}/{z}/{x}/{y}` | [Composite Source Tiles](30-config-file.md) |
| `/sprite/{spriteID}[@2x].{json,png}` | [Sprite sources](36-sources-spritess.md) |
| `/font/{font}/{start}-{end}` | [Font source](#37-sources-fonts.md) |
| `/font/{font1},…,{fontN}/{start}-{end}` | [Composite Font source](#37-sources-fonts.md) |
| `/health` | Martin server health check: returns 200 `OK` |
### Duplicate Source ID
In case there is more than one source that has the same name, e.g. a PG function is available in two schemas/connections, or a table has more than one geometry columns, sources will be assigned unique IDs such as `/points`, `/points.1`, etc.
@ -43,6 +45,25 @@ curl localhost:3000/catalog | jq
},
...
},
"sprites": {
"cool_icons": {
"images": [
"bicycle",
"bear",
]
},
...
},
"fonts": {
"Noto Mono Regular": {
"family": "Noto Mono",
"style": "Regular",
"glyphs": 875,
"start": 0,
"end": 65533
},
...
}
}
```