MapMatcher class abstract
This class provides map-matching functionality.
It determines whether a location can be matched to a nearby road network and provides additional OCM map data for that location.
Note: This is a beta release of this feature. There may be bugs and unexpected behaviors. Related APIs may change in future releases without a deprecation process.
A MapMatcher maintains an internal state across location updates.
This helps to check if the match is consistent with previous matches or if an unrealistic jump occurred due to low accuracy
of the provided location.
A MapMatcher requires OCM tile data, either through caching, prefetching, or installed Region data.
If the necessary tiles are not found, an online request is initiated. Note that in such cases,
the download is triggered silently in the background, and null is returned
immediately.
The MapMatcher supports two layer configurations for retrieving segment geometry data:
-
Rendering layer (
LayerConfiguration.Feature.RENDERING): Enabled by default. If your application uses map rendering orMapViewcomponents, using this layer is recommended. -
eHorizon layer (
LayerConfiguration.Feature.EHORIZON): Not enabled by default. It encodes segment geometries outside the rendering layer groups to reduce the amount of downloaded data. Use the eHorizon layer when:- No
MapViewis used in your application. - Only the eHorizon layer is used in your application. In these cases, using the eHorizon layer will reduce the required data to download. If the rendering layer is enabled, it will increase the required data to download.
- No
Important: If useRenderingLayers is set to false without properly enabling the eHorizon layer,
it may produce incorrect results. Layer configuration is especially important when prefetching or installing
region data. Missing data will be downloaded online automatically as needed.
If your hardware supports pitch and high precision altitude information and you want to use them in the MapMatcher
to improve map-matching, then enable the LayerConfiguration.Feature.ADAS layer:
- Turn on the
ADASlayer viaLayerConfiguration.enabledFeatures(it will increase data consumption). - If available, set
location.pitchInDegrees,location.coordinates.altitudeandlocation.verticalAccuracyInMeters. - In case of issues, please contact your HERE representative.
Constructors
- MapMatcher()
-
Creates a new instance of this class.
factory
- MapMatcher.withEngine(SDKNativeEngine sdkEngine)
-
Creates a new instance of this class.
factory
- MapMatcher.withLayers(SDKNativeEngine sdkEngine, bool useRenderingLayers)
-
Creates a new instance of this class.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
match(
Location location) → MapMatchedLocation? - This method computes the map-matched location for the provided input location.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited