Skip to main content

MapMatchResponse

distance_mnumber<double>

Total matched route distance in metres.

Example: 1840.5
duration_snumber<double>

Estimated travel time of the matched route in seconds.

Example: 195
coordinatesnumber[][]

Matched route geometry as [lng, lat] pairs snapped to roads.

Possible values: >= 2, <= 2

Example: [[-0.1867,5.6037],[-0.1851,5.6052]]
steps object[]

Turn-by-turn steps of the matched route.

  • Array [
  • instructionstring

    Standard turn instruction.

    Example: Turn right onto Ring Road Central.
    verbal_instructionstring

    Pre-built voice prompt suitable for TTS, delivered before the maneuver.

    Example: In 300 metres, turn right onto Ring Road Central.
    instruction_landmarkstring

    Landmark-enriched instruction (present when narration=landmark or both).

    Example: Turn right at Accra Mall onto Ring Road Central.
    namestring

    Street or road name for this step.

    Example: Ring Road Central
    near_landmarkstring

    Name of the nearest landmark to the maneuver point (within 150m).

    Example: Accra Mall
    distance_mnumber<double>

    Distance of this step in metres.

    Example: 320.5
    duration_snumber<double>

    Estimated duration of this step in seconds.

    Example: 45.2
  • ]
  • gps_distance_mnumber<double>

    Sum of haversine distances between consecutive input trace points (metres). Represents the raw GPS path length before snapping.

    Example: 1650
    divergence_rationumber<double>

    matched_distance / gps_distance. A ratio near 1.0 means the GPS trace closely follows the road network. Values above ~1.3 suggest the agent went off-road or the trace contains significant GPS noise — a useful fraud and compliance signal.

    Example: 1.12
    MapMatchResponse
    {
    "distance_m": 1840.5,
    "duration_s": 195,
    "coordinates": [
    [
    -0.1867,
    5.6037
    ],
    [
    -0.1851,
    5.6052
    ]
    ],
    "steps": [
    {
    "instruction": "Turn right onto Ring Road Central.",
    "verbal_instruction": "In 300 metres, turn right onto Ring Road Central.",
    "instruction_landmark": "Turn right at Accra Mall onto Ring Road Central.",
    "name": "Ring Road Central",
    "near_landmark": "Accra Mall",
    "distance_m": 320.5,
    "duration_s": 45.2
    }
    ],
    "gps_distance_m": 1650,
    "divergence_ratio": 1.12
    }