MATRIX API

The Matrix API returns travel times between many locations. One API hit corresponds to 10 transactions.


Parameters Required

NameTypeDescription
fm_tokenStringEnter Flightmap token available in Flightmap dashboard
start StringStarting points. Multiple latitudes and longitudes separated by semicolon.
example: start=30.7194022,76.7646552;30.6975401,76.8551066
endStringEnding points. Multiple latitudes and longitudes separated by semicolon.
example: end=30.76180185,76.8017019760213;30.75180185,76.8017019760213
type(optional) StringType can be Android, iOS or Web.

Request

https://maps.flightmap.io/api/matrix?fm_token=<your flightmap key>&start=30.7194022,76.7646552;30.6975401,76.8551066&end=30.76180185,76.8017019760213;30.75180185,76.8017019760213

Response

Description

Response is an MxN matrix assigned to a key named 'routes'. 'routes' is an array of object. Each object in 'routes' represents a source (M) which contains a key 'elements'. 'elements' is an array of objects containing distance and duration values for each destination (N) from source (M).

*Note : [ units:- duration:milliseconds,distance:meters ]

Below is a sample response, in JSON:

{ 
                "routes":[ 
                    { 
                        "elements":[ 
                            { 
                            "counter":0,
                            "distance":8262.152,
                            "duration":570683
                            },
                            { 
                            "counter":1,
                            "distance":12892.152,
                            "duration":916473
                            }
                        ]
                    },
                    { 
                        "elements":[ 
                            { 
                            "counter":0,
                            "distance":5868.641,
                            "duration":392880
                            },
                            { 
                            "counter":1,
                            "distance":10498.641,
                            "duration":738670
                            }
                        ]
                    }
                ]
                }

Let's find a way together

Get in touch to know about our Pricing Plans

Contact Us
Jungleworks