Skip to main content

MatrixRequest

sources object[]required

Origin points (hex codes or lat/lng). Maximum 50.

  • Array [
  • hexstring

    AfriHex code at resolution 7

    Example: AF-GH-7-0GXTJJB0ZZZZZ
    point object

    Raw coordinate

    lngnumber<double>
    Example: -0.1867
    latnumber<double>
    Example: 5.604
    headinginteger

    Device compass bearing in degrees (0 = north). On dual-carriageway roads it disambiguates which carriageway the endpoint snaps to, so routes don't begin with a phantom U-turn. Omit when unknown.

    Possible values: >= 0 and <= 359

    Example: 270
  • ]
  • destinations object[]

    Destination points. If omitted, a symmetric matrix over sources is returned. Maximum 50.

  • Array [
  • hexstring

    AfriHex code at resolution 7

    Example: AF-GH-7-0GXTJJB0ZZZZZ
    point object

    Raw coordinate

    lngnumber<double>
    Example: -0.1867
    latnumber<double>
    Example: 5.604
    headinginteger

    Device compass bearing in degrees (0 = north). On dual-carriageway roads it disambiguates which carriageway the endpoint snaps to, so routes don't begin with a phantom U-turn. Omit when unknown.

    Possible values: >= 0 and <= 359

    Example: 270
  • ]
  • modestring

    Possible values: [driving, foot, bicycle, motor_scooter]

    Default value: driving
    Example: driving
    MatrixRequest
    {
    "sources": [
    {
    "hex": "AF-GH-7-0GXTJJB0ZZZZZ",
    "point": {
    "lng": -0.1867,
    "lat": 5.604
    },
    "heading": 270
    }
    ],
    "destinations": [
    {
    "hex": "AF-GH-7-0GXTJJB0ZZZZZ",
    "point": {
    "lng": -0.1867,
    "lat": 5.604
    },
    "heading": 270
    }
    ],
    "mode": "driving"
    }