Skip to main content

HereMap

The HereMap component is the main container for HERE Maps. It provides the map context to all child components through React Context.

Props

string
required
Your HERE Maps API key. Get one at developer.here.com
object
Map initialization options
string
Map style/theme. Defaults to "vector.normal.map"Available styles:
  • vector.normal.map - Standard vector map
  • raster.satellite.map - Satellite imagery
  • raster.terrain.map - Terrain view
  • raster.normal.mapnight - Night mode
ReactNode
Child components (Markers, Polylines, Controls, etc.)

Basic Usage

The container must have a defined height for the map to render properly.

Map Styles

With Child Components

Context Provider

The HereMap component provides a context that can be accessed by child components:

Engine Types

P2D (Default)

2D rendering engine. Better performance on older devices.

WEBGL

WebGL rendering engine. Better performance with complex visualizations.

See Also

Map Context

Learn about the context system

Marker

Add markers to the map

Controls

Add interactive controls