Skip to main content

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 the Escape button, the app will open the specified back URL.

Examples:

  1. guru: - This opens Guru Maps without interrupting any ongoing action inside.
  2. guru:?back_url=https://gurumaps.app - This opens Guru Maps, and when the Escape key is pressed, it opens https://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:

  1. guru://open?url=https://gurumaps.app/example/feature_collection.geojson - import geojson by link
  2. guru://open?url=https://ms.gurumaps.app/ms/google/Google_Satellite_RU_HD.ms - import satellite map source by link.

API: guru://search?q=<search query>[&coord=lat,lon][&back_url=<url>][&back_url=<url>]

Parameters:

  • q - search string
  • coord - 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 the Escape button, the app will open the specified back URL.

Examples:

  1. 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.
  2. guru://search?q=Agrykola%201%20Warszawa - Will start a search with the query "Agrykola 1 Warszawa" over the current map position.

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 endpoint
  • via - coordinates of intermediate route points. You can use multiple intermediate points
  • start - coordinates of the starting point of the route. If not specified, the user's current position is used
  • mode - mode of transportation (auto, bicycle, pedestrian, motor_scooter, motorcycle, truck, straight). If not specified, auto is used
  • start_navigation - if set to true, navigation will start immediately after the route is built. If the parameter is not set or set to false, a route preview and editing screen will be displayed.
  • back_url - if set, and the user presses the Escape button, the app will open the specified back URL.

Examples:

  1. Building a route from the current position to the specified point: guru://nav?finish=52.2297,21.0122
  2. Building a route from the specified point to another specified point: guru://nav?start=52.2297,21.0122&finish=52.2397,21.0222
  3. Building a route with an intermediate point: guru://nav?start=52.2297,21.0122&finish=52.2397,21.0222&via=52.2347,21.0172
  4. 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
  5. Building a bicycle route: guru://nav?start=52.2297,21.0122&finish=52.2397,21.0222&via=52.2347,21.0172&mode=bicycle
  6. 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
  7. 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
  8. 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 are start, stop, and toggle.

Examples:

  1. guru://recordTrack?action=start - This starts the track recording in Guru Maps.
  2. guru://recordTrack?action=stop - This stops any ongoing track recording in Guru Maps.
  3. 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.
note

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:

  1. Creating a marker at the user's current position: guru://saveMarker
  2. Creating a marker at the user's current position with a specified name: guru://saveMarker?name=MyMarker
  3. Creating a marker at the specified position: guru://saveMarker?coord=52.2297,21.0122
  4. 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 the Escape button, the app will open the specified back URL.

Examples:

  1. guru://show?place=52.2297,21.0122 - This will open Guru Maps and display the specified point on the map.
  2. 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.
  3. 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 opens https://gurumaps.app.
note

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.