Start your server with the following code:
server: MapyCZServer = MapyCZServer(port=${PORT}, host="${HOST}")
server.listen()
Example usage on GitHub
Then, you can import the default layer data from the following URI:
http://${HOST}:${PORT}/tile/basic?x={x}&y={y}&z={z}
An example tile
The full format of the request is this URI:
http://${HOST}:${PORT}/tile/{mapType}?x={x}&y={y}&z={z}&tileSize={tileSize}&lang={lang}
Map types are the following:
| Name | Code value | Content type |
|---|---|---|
| Základní | basic | image/png |
| Turistická | outdoor | image/png |
| Letecká | aerial | image/jpg |
| Popisky a hranice | names-overlay | image/png |
| Zimní | winter | image/png |
| Name | Description | Required | Default | Values |
|---|---|---|---|---|
| x | The X coordinate | Yes | (error) | (any int) |
| y | The Y coordinate | Yes | (error) | (any int) |
| z | The zoom | Yes | (error) | (any int) |
| tileSize | Size of the tile | No | 256 | 256, 256@2x (only for základní, turistická, zimní map types) |
| lang | The tile's language | No | cs | cs, de, el, en, es, fr, it, nl, pl, pt, ru, sk, td, uk |
http://${HOST}:${PORT}/tile/basic?x={x}&y={y}&z={z}&tileSize=256@2x&lang=en
http://${HOST}:${PORT}/tile/outdoor?x={x}&y={y}&z={z}&tileSize=256@2x&lang=en
http://${HOST}:${PORT}/tile/aerial?x={x}&y={y}&z={z}&tileSize=256&lang=en
http://${HOST}:${PORT}/tile/names-overlay?x={x}&y={y}&z={z}&tileSize=256&lang=en
http://${HOST}:${PORT}/tile/winter?x={x}&y={y}&z={z}&tileSize=256@2x&lang=en
To get information about the tiles directly from mapy.cz, see this URL:
http://${HOST}:${PORT}/tiles.json?mapSet=basic&lang=cs
An example tiles.json file
For that, I've added this text and this json API endpoint.
Well, the base URI is the following:
http://${HOST}:${PORT}/geocoding/{kind}?{query}
but you have to use the official docs to get the query parameters (the API key is set automatically by my server). The kinds are the following: "rgeocode", "geocode" and "suggest". Note that here, the language is of the "cs" kind, but the country names are of the "cz" kind.
An example suggestionWell, the base URI is the following:
http://${HOST}:${PORT}/routing/route/?{query}
but you have to use the official docs to get the query parameters (the API key is set automatically by my server). Note that my code doesn't support multiple occurences of the same query key (yet), so you must use the "unexploded format".
An example route