Skip to main content

Render a HERE Map

Problem: Display a HERE map in a web page.

Prerequisites

  • A HERE platform API key with Map Rendering entitlement
  • export HERE_API_KEY="..."
Raster Tile API v3 replaces Map Tile API v2.If you are reading a tutorial using https://{1-4}.base.maps.ls.hereapi.com/maptile/2.1/basetile/..., that is the deprecated v2 API. It also requires a HERE developer account.v3 requires a HERE platform account. Old developer-account keys do not work.

The tile URL

https://maps.hereapi.com/v3/base/mc/{z}/{x}/{y}/{format}?style={style}&apiKey={KEY} Query /v3/info for the styles available on your account.

The code

Useful parameters

features= selects optional tile content. Available features are defined per style — each style supports a different set. pview= renders boundaries per a country’s geopolitical view (ISO 3166-1 alpha-2). Relevant where territory is disputed. This is a legal and product decision, not a default. lang / lang2 — BCP47, ISO 639-1 two-letter codes. (v2 used three-letter MARC codes; the parameter names and format both changed.)

Common mistakes

Using the deprecated v2 tile host. base.maps.ls.hereapi.com/maptile/2.1/... Using a developer-account key against v3. It requires a platform account. Shipping an unrestricted key in frontend JavaScript. It is public. If it has no domain restriction, it is now someone else’s key and someone else’s invoice. No CDN in front of tiles. They are static per zoom, x, y, style. This is the highest-leverage cost reduction in rendering, and it is available on any platform. tileSize: 512 without zoomOffset: -1 in Leaflet. Your map is at the wrong zoom. Reversing coordinate order. MapLibre and GeoJSON are [lng, lat]. HERE REST APIs are lat,lng. Traffic overlay always on. It is a separate meter. Omitting attribution. Contractual. Assuming web tile entitlement covers the mobile SDK. Separate entitlements. Discovered at app store submission. Rendering a full interactive map where a static image would serve. A thumbnail on a job card does not need panning.

Production considerations

Put a CDN in front of tile requests. Fix this first. Restrict browser keys by domain. Consider a thin server-side proxy: keeps the key private, adds a cache layer and per-tenant metering, costs latency. Make overlays toggleable and attributable. Traffic and restriction layers bill separately from base tiles. Do not pre-fetch aggressively. Tiles fetched and never viewed are pure spend. Billing model varies by implementation. Web tiles, mobile SDK, and static maps meter differently for what looks like the same map. Know which one you shipped before you forecast. Query /v3/info to confirm which styles your entitlement includes.

Maps

Vector vs raster, entitlement boundaries, and billing models.

Display a Route on a Map

Decoding a Flexible Polyline and drawing it.

Traffic Flow

Overlaying live congestion.

HERE SDK

When you need offline and on-device rendering instead.

HERE documentation


Need production HERE API keys or implementation support? Placematic is an official HERE Technologies reseller and implementation partner. Talk to us.