API for Integration with Guru Maps
Guru Maps supports guru://
and geo://
schemas for integration with other apps. This allows interaction with the application and use its functionality for file import, search, navigation, track recording, and saving the current location.
Open Guru Maps
API: guru:[?back_url=<url>]
Parameters:
back_url
- if set, and the user presses theEscape
button, the app will open the specified back URL.
Examples:
- guru: - This opens Guru Maps without interrupting any ongoing action inside.
- guru:?back_url=https://gurumaps.app - This opens Guru Maps, and when the
Escape
key is pressed, it openshttps://gurumaps.app
.
File Import
API: guru://open?url=<url to the file>
Parameters:
url
- URL link to the file for import.
Guru will download the file from the specified URL and attempt to import it. Supported file formats: GPX, KML, KMZ, WPT, PLT, TCX, MS, geojson, mapcss, sqlitedb, mbtiles.
Examples:
- guru://open?url=https://gurumaps.app/example/feature_collection.geojson - import geojson by link
- guru://open?url=https://ms.gurumaps.app/ms/google/Google_Satellite_RU_HD.ms - import satellite map source by link.
Search
API: guru://search?q=<search query>[&coord=lat,lon][&back_url=<url>][&back_url=<url>]
Parameters:
q
- search stringcoord
- coordinates of the point over which the search will be launched, in the format lat,lon. If not specified, the search will start over the current map position.back_url
- if set, and the user presses theEscape
button, the app will open the specified back URL.
Examples:
- guru://search?q=Wybrzeże%20Kościuszkowskie%2020%20Warszawa&coord=52.2297,21.0122 - Will start a search with the query "Wybrzeże Kościuszkowskie 20 Warszawa" and the map center set to the specified coordinates.
- guru://search?q=Agrykola%201%20Warszawa - Will start a search with the query "Agrykola 1 Warszawa" over the current map position.
Navigation
API: guru://nav?finish=lat,lon[&via=lat,lon][&start=lat,lon][&mode=<auto, bicycle, pedestrian, motor_scooter, motorcycle, truck, straight>][&start_navigation=<true,false>][&back_url=<url>]
Parameters:
finish
- coordinates of the route endpointvia
- coordinates of intermediate route points. You can use multiple intermediate pointsstart
- coordinates of the starting point of the route. If not specified, the user's current position is usedmode
- mode of transportation (auto, bicycle, pedestrian, motor_scooter, motorcycle, truck, straight). If not specified, auto is usedstart_navigation
- if set totrue
, navigation will start immediately after the route is built. If the parameter is not set or set tofalse
, a route preview and editing screen will be displayed.back_url
- if set, and the user presses theEscape
button, the app will open the specified back URL.
Examples:
- Building a route from the current position to the specified point: guru://nav?finish=52.2297,21.0122
- Building a route from the specified point to another specified point: guru://nav?start=52.2297,21.0122&finish=52.2397,21.0222
- Building a route with an intermediate point: guru://nav?start=52.2297,21.0122&finish=52.2397,21.0222&via=52.2347,21.0172
- Building a route with two intermediate points: guru://nav?start=52.2297,21.0122&via=52.2347,21.0172&via=52.2765,21.234&finish=52.2397,21.0222
- Building a bicycle route: guru://nav?start=52.2297,21.0122&finish=52.2397,21.0222&via=52.2347,21.0172&mode=bicycle
- Building a route and starting navigation immediately: guru://nav?start=52.2297,21.0122&finish=52.2397,21.0222&via=52.2347,21.0172&mode=bicycle&start_navigation=true
- Building a route and returning to a specified URL upon pressing the
Escape
key: guru://nav?finish=52.2297,21.0122&back_url=https://gurumaps.app - Building a route, start navigation and returning to a specified URL upon pressing the
Escape
key: guru://nav?finish=52.2297,21.0122&start_navigation=true&back_url=https://gurumaps.app
Start/Stop/Toggle Track Recording
API: guru://recordTrack?action=<start,stop,toggle>
Parameters:
action
: This determines what action to take on track recording. The options arestart
,stop
, andtoggle
.
Examples:
- guru://recordTrack?action=start - This starts the track recording in Guru Maps.
- guru://recordTrack?action=stop - This stops any ongoing track recording in Guru Maps.
- guru://recordTrack?action=toggle - This toggles the track recording status. If a recording is currently in progress, this action will stop it. If no recording is in progress, this action will start a new one.
If an invalid action is given or no action is specified, the API will default to toggle
. This means that guru://recordTrack will behave the same as guru://recordTrack?action=toggle.
Creating a Marker
API: guru://saveMarker[?name=<marker name>][&coord=lat,lon]
After creating a marker, its details should be opened.
Parameters:
name
- marker name. If not specified, it will be filled in automatically.coord
- marker coordinates. If not specified, the user's current position will be used.
Examples:
- Creating a marker at the user's current position: guru://saveMarker
- Creating a marker at the user's current position with a specified name: guru://saveMarker?name=MyMarker
- Creating a marker at the specified position: guru://saveMarker?coord=52.2297,21.0122
- Creating a marker at the specified position with a specified name: guru://saveMarker?name=MyMarker&coord=52.2297,21.0122
Displaying a Place with Specified Coordinates on the Map
API: guru://show?place=lat,lon[,zoom][&back_url=<url>]
Parameters:
place
: Coordinates of the place to be displayed on the map.zoom
: Optional. The scale at which the selected point should be displayed. If not specified, the current map scale will be used.back_url
: Optional. If set, and the user presses theEscape
button, the app will open the specified back URL.
Examples:
- guru://show?place=52.2297,21.0122 - This will open Guru Maps and display the specified point on the map.
- guru://show?place=52.2297,21.0122,17 - This will open Guru Maps and display the specified point on the map at the 17th scale.
- guru://show?place=52.2297,21.0122&back_url=https://gurumaps.app - This will open Guru Maps, display the specified point, and if the
Escape
key is pressed, it openshttps://gurumaps.app
.
The geo:
scheme is also supported by Guru Maps. For example, you can use geo:52.2297,21.0122
to display a specific location on the map. However, the geo:
scheme does not support the back_url
parameter. For functionalities that require the back_url
parameter, please use the guru://
scheme.