jungle-gif

50,000 maploads free every month. Get started now!

DISTANCE MATRIX API

This API gives the feature to find the best possible distance between the origin latitude, longitude and the destination latitude, longitude.


Parameters Required

NameTypeDescription
fm_tokenStringEnter Flightmap token available in Flightmap dashboard
originlatitudenumericEnter the source latitude.
originlongitude numericEnter the source longitude.
destinationlatitude numericEnter the destination latitude.
destinationlongitudenumericEnter the destination longitude.
typeStringtype can be Android, iOS or Web

Request

The following example requests the distance shows the best possible distance between two places

https://maps.flightmap.io/api/distancematrix?fm_token=<your api key here>&originlatitude=30.71940&originlongitude=76.7646552&destinationlatitude=21.1500964&destinationlongitude=79.0127048991

Response

Description

NameTypeDescription
dataobjectComplete information of the distance
distanceString Display the distance between two places in KM
TimeStringDisplay the time in Minutes
ETA numericEstimate Time Arrival in minutes
ETA_textString Estimate Time Arrival in string format
distance_in_meternumericDistance in meters
time_in_secondnumericDisplay time in seconds

The Distance Matrix API returns following result in a JSON format.

DesBelow is a sample response, in JSON:cription

{
      "message": "Successful",
      "status": 200,
      "data": {
        "distance": "1287.022459 KM",
        "Time": "1068.3301666666666 Minute",
        "ETA": 1071.3301666666666,
        "ETA_text": "17 hours 51 minutes",
        "distance_in_meter": 1287022.459,
        "time_in_second": 64099.81
      }
    }

Let's find a way together

Get in touch to know about our Pricing Plans

Contact Us