MapyCZServer - Usage

Start your server with the following code:

server: MapyCZServer = MapyCZServer(port=${PORT}, host="${HOST}")
server.listen()
Example usage on GitHub

Tiles API

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

Tiles query params

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 type

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

Query params:

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
Visit mapy.cz API docs for more info about the tiles

Example QGIS tiles usage:

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
An example QGIS usage
Example QGIS project on GitHub

Tiles.json

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

I want a valid API key

For that, I've added this text and this json API endpoint.


I want the geocoding API

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 suggestion
An example geocode
An example reverse geocode
Visit mapy.cz API docs for more info about geocoding

I want the routing API

Well, 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
Visit mapy.cz API docs for more info about routing