Calling the Mapy.cz mobile application
The Mapy.cz application for Android and iOS can be called from your applications, offering users options such as opening a specific location, coordinates, search, or directions to your company. Below are instructions on how to establish such integration:
Android
Android Geo URI
The application responds to the standard Geo URI scheme, primarily used for marking a location on the map or searching for a place.
Official description: https://en.wikipedia.org/wiki/Geo_URI_scheme
Examples:
intent | description |
geo:50.0710792,14.40094 | opens the location with the specified coordinates in the application |
geo:50.0710792,14.40094?q=Nový Smíchov | performs a search for “Nový Smíchov” in the vicinity of the specified coordinates |
geo:0,0?q=bankomaty | performs a search for “bankomaty” in the vicinity of the user’s position or the center of the map viewport if the user has GPS disabled |
It is possible to call with the application package ID cz.seznam.mapy
(opens directly in mapy.cz) or without it, and other applications supporting the Geo URI will respond to the intent as well.
package id + intent | description |
cz.seznam.mapy geo:50.0710792,14.40094 | opens the mapy.cz application and shows the location with the specified coordinates |
Navigation Intent
Support for the intent response, which is supported by Google Maps. It is based on: https://developers.google.com/maps/documentation/urls/android-intents#launch-turn-by-turn-navigation
intent | description |
google.navigation:q=a+street+address example: adb shell am start -a android.intent.action.VIEW -d "google.navigation:q="Lomnice+nad+Popelkou" | – initiates a place search – parameters mode and avoid do not work |
google.navigation:q=latitude,longitude&mode=mode example: adb shell am start -a android.intent.action.VIEW -d "google.navigation:q=50.5857571,14.6373946\&mode=d" | – starts navigation – supports the mode parameter (optional): d – driving b – biking l – transit w – walking The last selected mode during navigation will be used (tourist, fastest with traffic, etc.) – if mode is not specified, the default mode (driving) will be used – avoid is not supported |
Mapy.cz URL
The application captures and responds to its own URL, mapy.cz.
- No specific settings are required, except if the user has set a different “Default App” on their mobile device to respond to this URL, then the phone may react differently and open a browser or another application.
- How to delete default apps: https://support.google.com/android/answer/6271667?hl=cs
- The application responds to both shortened and full-length URLs.
Location, Coordinates:
You can compose the URL to perform a search, for example:
Location: https://mapy.cz/zakladni?q=liberec
Coordinates: https://mapy.cz/zakladni?q=50.1222139N%2C14.4138156E
Multiple locations: https://mapy.cz/zakladni?q=bankomaty%20fio
Mapy.cz URL
The URL cannot be easily composed; it is necessary to prepare the URL on Mapy.cz.
The application responds to the standard mapy.cz URL: https://mapy.cz/zakladni?x=14.1874130&y=49.9381469&z=16&source=base&id=1701792
Alternatively, a shortened URL: https://mapy.cz/s/guragaveha
Route:
The URL cannot be easily composed; it is necessary to prepare the URL on Mapy.cz or use the map API.
How to create a URL for route planning using the API: https://api.mapy.cz/view?page=url
Shortened URL: https://mapy.cz/s/bakakapade
Google URL
The Android application also responds to URLs and schemes from Google, especially for navigation purposes.
Example: Using the intent format http://maps.google.com/maps?saddr=Prague&daddr=Jihlava&dirflg=d
- We handle cases when the starting point or destination is missing, similar to our map URLs.
- We navigate from the source to the destination, where
mode.value
is eitherw
for walking ord
for driving.
Link to Google documentation: https://developers.google.com/maps/documentation/urls/guide
iOS
Geo URI iOS
The application responds to the standard geo URI scheme on iOS. It is mainly used for marking a location on the map or searching for a place.
Official description: https://en.wikipedia.org/wiki/Geo_URI_scheme
Examples:
intent | description |
geo:50.0710792,14.40094 | Opens the location on the specified coordinates in the application. |
geo:50.0710792,14.40094?q=Nový Smíchov | Performs a search for “Nový Smíchov” around the given coordinates. |
geo:0,0?q=bankomaty | Searches for “bankomaty” in the vicinity of the user’s position or around the center of the application’s map viewport (if the user has GPS turned off). |
Currently, it is not possible to directly target the opening of the application.
Mapy.cz URL
It responds to the same URLs as Android, as mentioned above.
On iOS, the scheme for opening the application is szn-mapy://
.