Custom maps
Learn how custom maps let you add business-specific map layers to the Map in MyGeotab.
MyGeotab supports custom maps. This feature lets your organization design business-specific maps that combine with vehicle information on the Map. Example uses include maps that show customer-centric information, underground water flow, municipal boundaries, or city infrastructure such as power, roads, and sewage systems.
Custom map layers are based on OpenLayers. MyGeotab supports four types of custom map layers:
xyz: tile server arranged by a standard XYZ grid
osm: OpenStreetMap tiles
wms: OGC Web Mapping Services
ArcGIS93Rest: mapping services hosted by an ArcGIS server 9.3 or later
Limitations
Custom maps currently have the following limitations:
All overlay layers are visible by default. Use the checkbox for each layer to turn it on or off individually.
Overlay layers are not transparent by default.
Adding a custom map configuration
Learn how to add a custom map configuration to MyGeotab.
Custom map configuration is accessed from the Map.
Your custom web map configuration is saved and appears as an option in Accessing your custom map view.
Accessing your custom map view
Learn how to switch to a custom map configuration from the Map.
Custom map configurations can be accessed from the Map.
- Navigate to Map from the main menu.
- Click the layers icon in the bottom right corner, then select Map Provider.
- Select your custom map configuration from the list.
The Map updates to display your custom map configuration.
Custom map configuration parameters
Learn how to set the units, projection, and layer parameters for a custom map.
Map configuration
Use the units and projection parameters to configure a custom map. Use the default values shown below unless your map requires otherwise.
Parameter | Definition | Description |
|---|---|---|
units | The map unit. | Optional. The default value is "m" or "meter". |
projection | The projected coordinate system used by the map. | Optional. The default value is "EPSG:3857", the Spherical Mercator projection coordinate system used by web services such as Google Maps and OpenStreetMap. |
Sample configuration:
| <code>{ |
| "units": "m", |
| "projection": "EPSG:3857" |
| }</code> |
Layer configuration
Layers are the contents of your map and fall into two types: base layers and overlay layers.
Base layers: a map must have at least one base layer. You can include multiple base layers in a map, but only one can be active and visible at a time.
Overlay layers: you can have multiple overlay layers. All overlay layers are visible by default, and you can turn each one on or off individually.
Layer parameters
Parameter | Description |
|---|---|
type | The supported types are "xyz", "osm", "arcgis93rest", and "wms". |
name | The layer name that displays in the layer selection window. |
urls | All URLs must use HTTPS. |
options | Within options, isBaseLayer sets whether the layer is a base layer. This is optional, and the default value is true. format is the exported tile format. This is optional, and the default value is png. |
param | Within param, layers are the selected layers for a WMS service. This is mandatory for the wms layer type and optional for other layer types. |
Enclose the entire layer configuration in square brackets, and enclose each individual layer in curly braces. Separate multiple layers with a comma, and separate the parameters within a layer with a comma.
Sample layer configuration:
| <code>[ |
| { |
| "type": "", |
| "name": "", |
| "urls": "https://yourdomain.com", |
| "options": { |
| "format": "png32", |
| "isBaseLayer": false |
| }, |
| "param": {} |
| }, |
| { |
| "type": "", |
| "name": "", |
| "urls": "https://yourdomain.com", |
| "options": { |
| "format": "png32" |
| }, |
| "param": {} |
| } |
| ]</code> |
Custom map layer templates
Explore templates for XYZ, OSM, WMS, and ArcGIS map layers.
Esri ArcGIS Online tiled map service (xyz)
Use this template to show a tile mapping service hosted on an ArcGIS Online account. The service REST URL must be publicly accessible.
| <code>{ |
| "type": "xyz", |
| "name": "AGOL_Ohio_OrthoImage", |
| "urls": [ |
| "https://tiles.arcgis.com/tiles/b8eHPJ5KRnX3dHNa/arcgis/rest/services/Ortho_Map_Tile_Package_2/MapServer/tile/${z}/${y}/${x}" |
| ], |
| "options": { |
| "format": "png", |
| "isBaseLayer": false |
| } |
| }</code> |
Custom tiled map service (xyz)
Provide a tile server access URL that includes the zoom level and x and y tile coordinates. The URL may need an access token or API key appended after a question mark at the end of the URL.
| <code>{ |
| "type": "xyz", |
| "name": "Custom Tile Server with Token", |
| "urls": [ |
| "https://public_tiles.dronedeploy.com/v1/tiles_images/5dd7155658881675c4519c78/orthomosaic/${z}/${x}/${y}?token=example-token" |
| ], |
| "options": { |
| "format": "png", |
| "isBaseLayer": false |
| } |
| }</code> |
WMTS layer (xyz)
WMTS (Web Map Tile Service) is an OGC standard. Provide the XML capabilities using a URL in the following pattern: https://{server}/arcgis/rest/services/{folder}/{service}/MapServer/WMTS/1.0.0/WMTSCapabilities.xml.
| <code>{ |
| "type": "xyz", |
| "name": "WMTS-xyz", |
| "urls": [ |
| "https://services.arcgisonline.com/arcgis/rest/services/Demographics/USA_Population_Density/MapServer/WMTS/tile/1.0.0/Demographics_USA_Population_Density/default/default028mm/${z}/${y}/${x}" |
| ], |
| "options": { |
| "format": "png", |
| "isBaseLayer": false |
| } |
| }</code> |
MapBox tiles (xyz)
To use a MapBox map layer, you need a Mapbox access token and a Mapbox style URL.
| <code>{ |
| "type": "xyz", |
| "name": "MapBox_Example", |
| "urls": [ |
| "https://api.mapbox.com/v3/example.map-id/${z}/${x}/${y}.png" |
| ], |
| "options": { |
| "isBaseLayer": true |
| } |
| }</code> |
MapBox satellite layer example:
| <code>{ |
| "type": "xyz", |
| "name": "MapBox_Satellite", |
| "urls": [ |
| "https://api.mapbox.com/v4/mapbox.satellite/${z}/${x}/${y}.png?access_token=example-token" |
| ], |
| "options": { |
| "isBaseLayer": false |
| } |
| }</code> |
Open Street Map (osm)
For more details, refer to the OpenStreetMap tile servers wiki.
| <code>{ |
| "type": "osm", |
| "name": "OpenStreetMap", |
| "urls": "https://{a-c}.tile.openstreetmap.org/${z}/${x}/${y}.png", |
| "options": { |
| "isBaseLayer": true |
| } |
| }</code> |
Canada Weather (wms)
Web Map Services (WMS) are a standard from the Open Geospatial Consortium (OGC). To get information about a WMS, request its GetCapabilities results. From the results, extract the URL and layer information. Layers can have multiple layer names listed as a comma-separated list.
| <code>{ |
| "type": "wms", |
| "name": "WMS-Canada-RADAR_1KM_RSNO", |
| "urls": [ |
| "https://geo.weather.gc.ca/geomet" |
| ], |
| "options": { |
| "isBaseLayer": false |
| }, |
| "params": { |
| "layers": "RADAR_1KM_RSNO" |
| } |
| }</code> |
NOAA Satellite (wms)
| <code>{ |
| "type": "wms", |
| "name": "WMS-NOAA", |
| "urls": [ |
| "https://idpgis.ncep.noaa.gov/arcgis/services/NWS_Observations/radar_base_reflectivity/MapServer/WMSServer" |
| ], |
| "options": { |
| "isBaseLayer": false |
| }, |
| "params": { |
| "layers": "1", |
| "Tiled": true |
| } |
| }</code> |
Map layer hosted by Esri ArcGIS Server (arcgis93rest)
This template displays map data from a map service hosted by an Esri ArcGIS server, version 9.3 or later. To use the template, the map service must have the Export Map feature and provide a REST URL.
| <code>{ |
| "type": "arcgis93rest", |
| "name": "StateCityHighway_USA", |
| "urls": [ |
| "https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer" |
| ], |
| "options": { |
| "format": "png", |
| "isBaseLayer": false |
| }, |
| "params": { |
| "layers": "show:2", |
| "layerDefs": "2:STATE_NAME='Ohio'" |
| } |
| }</code> |
If the Dynamic Layers option is available in the Export Map service (ArcGIS Server 10.2 and later), add dynamicLayers as one of the params to change the styles of the layers on the Map:
| <code>{ |
| "type": "arcgis93rest", |
| "name": "Snow Ops", |
| "urls": "https://example.com/arcgis/rest/services/Snow/Snow_Ops/MapServer", |
| "options": { |
| "format": "png32", |
| "isBaseLayer": false |
| }, |
| "params": { |
| "layers": "show:0", |
| "FORMAT": "PNG32", |
| "TRANSPARENT": true, |
| "dynamicLayers": "[{'id':0,'name':'Snow Priority Routes','source':{'type':'mapLayer','mapLayerId':0}}]" |
| } |
| }</code> |
Learn more about the dynamicLayers parameter at this Esri support article. Replace double quotes with single quotes within the dynamicLayers value.