Online maps

The Cartograph app can be extended with custom online maps:


Install user created online maps

The following table lists ready-to-install online maps:

NameTypeInstall
Google maps (road, terrain, satellite)RasterInstall
Microsoft Bing (road, satellite)Raster Install
Ready-to-install online maps.

Manually adding an online map

Please use the online map creation tool for creating a custom online map entry.


Manually adding a WMS online map

Please use the online map creation tool for creating a custom online map entry .


Creating online map definition files

Online map definition files contain a list of online map definitions which can be easily installed from a web server by creating a link of the format “cartograph://www.myserver.com/myonlinemaps.onlinemap”. The file extension of definition files must be “*.onlinemap“.

The following code shows an example definition file which creates a folder containing two maps:

{
  "version": 3,
  "folders":[
    {
      "name": {
        "default": "Example online maps folder"
      },
      "description": {
        "default": ""
      },
      "folder_key":"",
      "key":"example_online_maps"
    }
  ],
  "maps": [
    {
      "name": {
        "default": "OpenStreetMap Example Map",
        "de": "OpenStreetMap Beispielkarte"
      },
      "description": {
        "default": ""
      },
      "type": "onlinemap",
      "url": "http://tile.openstreetmap.org/{z}/{x}/{y}.png?tilesize={ts}",
      "attribution": "© OpenStreetMap contributors\nhttp://www.openstreetmap.org/copyright",
      "defaultLatitude": 51.47,
      "defaultLongitude": 0,
      "defaultZoom": 1,
      "minZoom": 0,
      "maxZoom": 22,
      "projection": "EPSG_4326",
      "headers": [
        {
          "key": "User-Agent",
          "value": "My user-agent"
        }
      ],
      "unique_id": "example.openstreetmap.org",
      "folder_key":"example_online_maps"
    },
    {
      "name": {
        "default": "NASA WMS map"
      },
      "description": {
        "default": ""
      },
      "type": "wms",
      "url": "",
      "service_url": "https://neo.sci.gsfc.nasa.gov/wms/wms?version=1.3.0&service=WMS&request=GetCapabilities",
      "attribution": "© NASA",
      "defaultLatitude": 51.47,
      "defaultLongitude": 0,
      "defaultZoom": 1,
      "minZoom": 0,
      "maxZoom": 22,
      "projection": "EPSG_4326",
      "headers": [
        {
          "key": "User-Agent",
          "value": "My user-agent"
        }
      ],
      "unique_id": "example.neo.sci.gsfc.nasa.gov",
      "folder_key":"example_online_maps"
    }
  ]
}

Folders

The “folders” element contains a list of folders which can be used for grouping the maps. Each folder has an unique “key” which must be unique in the app. A recommended format for the key is “com.myserver.some_unique_string”. The “folder_key” field can be used for creating hierarchies of folders (if left empty then the folder is placed in the root folder).

Maps

The “maps” element contains a list of online maps. The following fields are available:

  • name“: The name of the map.
  • description“: A description of the map.
  • type“: The map type:
    • “onlinemap”: A raster tiles online map providing png, jpg, or bmp images.
    • “onlinemap_bing”: A raster map using Bing quadkey urls.
    • “onlinemap_mvt”: A vector tiles online map providing Mapbox vector tiles.
    • “wms”: A WMS (web map service) map.
  • url” (optional for WMS maps): The server url for requesting tiles. The following variables are available:
    • “{x}”: The x coordinate of the tile.
    • “{y}”: The y coordinate of the tile.
    • “{z}”: The zoom level.
    • “{ts}” (optional): The tile size.
    • “{quadkey}” (for Bing maps): The Bing tile quad key.
  • service_url” (WMS maps only): The service URL of the WMS. The service url usually has the following format: “https://neo.sci.gsfc.nasa.gov/wms/wms?version=1.3.0&service=WMS&request=GetCapabilities“.
  • attribution“: The copyright/attribution for the map.
  • defaultLatitude“: The default latitude position of the map.
  • defaultLongitude“: The default longitude position of the map.
  • defaultZoom“: The default zoom level.
  • minZoom“: The minimum zoom level supported by the map.
  • maxZoom“: The maximum zoom level supported by the map.
  • projection“: The map projection. This should always be “EPSG_4326”.
  • headers“: A list of headers sent with each map request. This can include the “User-Agent”, service specific API keys, etc.
  • unique_id“: A unique id for the map. The unique id must be unique in the Cartograph app.
  • folder_key“: The folder in which the map is located.