GuidesAPI Reference
Guides

Bring your own data - deprecated

📘

Note

Support for custom layers and custom routing is deprecated.

Overview

Private maps are often used for store locations, additional map display content, and search functions like store locators.

Customers can create private maps with their own layers, that contain points, polylines, and polygons with attributions. These maps can be searched, retrieved, and used similarly to HERE maps.

Private maps can also include changes to the road network and act as overlays to the HERE map network. This way, the routes returned by HERE Routing API v8 can be altered. Overlay maps can add roads, modify road attributes (such as access permissions, one-way roads, weight restrictions, speed limits), or prevents certain roads from being used in routing.

Such overlays enable routing within private facility roads, routing to individual loading docks, or to block/allow/prefer certain roads for fleets.

Map layers

Custom maps can have multiple layers. A layer must contain objects of the same type. Objects that are searched, displayed, or updated together should be grouped into one layer.

Examples of layers:

  • Store locations
  • Positions of delivery trucks
  • Arrival isoline polygons around stores and warehouses

Upload custom map content

Upload private maps through REST calls. Map layers can be uploaded in CSV or Shapefile format. Road overlay maps can be uploaded in overlay.json format.

Map storage

There are two storage types available for custom maps: "updatable" and "readonly". You can insert/update/delete individual records and append records in "updatable" map storage. Maps in "readonly" storage can't be modified. Instead, the full map must be uploaded again. The default storage type for custom maps is "updatable". Road overlay maps are always stored in "readonly" storage. Choose "readonly" for large maps that rarely change, because it offers higher search and retrieval performance.

File format requirements

Geometry rows in CSV and Shapefile formats can have arbitrary attribute columns. Each row in a CSV file contains map object attributes and a well-known text (WKT) format geometry (point, line, polygon). Column names must conform to [A-Za-z][A-Za-z0-9_]* format. The space character is the only valid whitespace character.

Values in columns must be plain text strings not exceeding 4000 characters in UTF-8 encoding. To create numeric columns in CSV format, add number after the column name. Numeric expressions can then be applied in search filters on those columns.

Escape characters like quotes or backslashes aren't recognized (interpreted as plain characters without special semantics). The geometry column WKT in CSV files must be the last column. If it's not, it will be moved after the last column.

If the layer contains a GEOMETRY_ID column, it must be numeric and unique within the layer. If the layer doesn't contain a GEOMETRY_ID column, one will be added to uniquely identify each geometry record for actions such as modifying or deleting.

Upload a layer

Use the following resource to upload a layer with one store. Note that uploads should use POST requests.

https://smap.hereapi.com/v8/maps/upload?layerId={YOUR_APP_ID}.MY_STORES.GROCERIES&apiKey={YOUR_API_KEY}

Example content in the POST body:

POI_ID	NAME	SIZE_SQM	WKT
12345	Walmart_Munich	650	POLYGON((12.43236 41.93602,12.40524 41.86165,12.70084 41.89233,12.70084 41.89233,12.43236 41.93602))

Upload an overlay

Use the following resource to upload an overlay that changes road access permissions and adds a road. Note that uploads should use POST requests.

curl -gX POST 'https://fleet.ls.hereapi.com/v8/maps/overlays/upload?'\
'map_name=OVERLAYTEST12345'\
'&overlay_spec=%5B%7B%22op%22%3A%22override%22%2C%22shape%22%3A%5B%5B50.10765%2C8.68774%5D%2C%5B50.10914%2C8.68771%5D%5D%2C%22layer%22%3A%22LINK_ATTRIBUTE_FCn%22%2C%22data%22%3A%7B%22VEHICLE_TYPES%22%3A%220%22%7D%7D%2C%7B%22op%22%3A%22create%22%2C%22shape%22%3A%5B%5B50.10937%2C8.68422%5D%2C%5B50.10807%2C8.68525%5D%2C%5B50.10737%2C8.68387%5D%5D%2C%22data%22%3A%7B%22NAMES%22%3A%22ENGBNDemoRoad%22%7D%7D%5D'\
'&apiKey={YOUR_API_KEY}'

List private maps

Use the following resource to list customer's private maps. mapType value should be either 0 (default public + private), 1 (public), or 2 (private).

https://smap.hereapi.com/v8/maps/list.html?mapType=2&apikey={YOUR_API_KEY}

List map layers

Use the following resource to list the layers of a map.

https://smap.hereapi.com/v8/maps/layers/list.html?map_name=MY_STORES&apiKey={YOUR_API_KEY}

Examples