Mappls Aerial Distance API¶
Easy To Integrate Maps & Location APIs & SDKs For Web & Mobile Applications
Powered with India's most comprehensive and robust mapping functionalities. Now Available for Srilanka, Nepal, Bhutan, Myanmar and Bangladesh
You can get your api key to be used in this document here: https://about.mappls.com/api/
Disclaimer¶
The document contains sensitive information on parameters and responses that can be accessed only by Mappls. Redistribution without permissions is prohibited. It is mandatory to take permissions from the author before sharing with any personnel outside Mappls.
Introduction¶
Aerial Distance¶
Adding Aerial Distance API would help to calculate the distance between two points on the map. For example, you can measure the mileage in a straight line between two cities.
You can now easily estimate how big the lake near your house is, or just the aerial distance between Delhi and Mumbai is 1150.06 km (714.61 mi). Same time this API doesn't calculate road distance between two points.
Getting Access¶
Before using the API in the your solution, please ensure that the related access is enabled in the Mappls Console, in the same project you set up for the Maps SDK.
- Copy and paste the generated
access token
from your API keys available in the dashboard in the path of the API URL at the appropriate place.- This APIs follow OAuth2 based security.
Access Token
can be generated using Token Generation API.- To know more on how to create your access tokens, please use our authorization API URL. More details available here
- The
access token
is a valid by default for 24 hours from the time of generation. This can be configured by you in the API console.
-
Security Type
This APIs follow OAuth2 based security. To know more on how to create your authorization tokens, please use our authorization token URL. More details available here
Input Method¶
GET
Example URL using coordinates:¶
https://apis.mappls.com/advancedmaps/v1/<access_token>/distanceA?from=34.506172,76.108652&to=28.4586,77.85698&unit=K
where:
- "distanceA" is the chosen resource.
- from
request parameter denotes the start position.
- Example: from=34.506172,76.108652
- to
request parameter denotes the destination position.
- Example: to=28.4586,77.85698
Note: The position input is in decimal degree notation of latitude,longitude.
Example URL using eLoc:¶
https://apis.mappls.com/advancedmaps/v1/<access_token>/distanceA?from=mmi000&to=17zul7&unit=K
where:
- "distanceA" is the chosen resource.
- from
request parameter denotes the start position.
- Example: from=mmi000
- to
request parameter denotes the destination position.
- Example: to=17zul7
Note: The position input is in decimal degree notation of longitude,latitude.
Request Parameters¶
Mandatory Parameters:¶
from
request parameter denotes the start position.to
request parameter denotes the destination position.
Optional Parameters:¶
Unit
: unit of distance (default value is K)- K: Kilometre
- N: Nautical Miles
- M: Miles
Response Type¶
JSON: response will served as JSON
Response Parameters¶
The Aerial_Distance API will return only one result object. The following output parameters will be supported in the Aerial_Dstance API response.
responseCode
: See the service dependent and general status codes.results
: array of results, each consisting of the following parameters.distance
: a distance between strart & destinaton.unit
: unit of distance.
Response Codes¶
- 200: To denote a successful API call.
- 204: DB Connection error.
- 400: Bad Request, User made an error while creating a valid request.
- 401: Unauthorized, Developer’s key is not allowed to send a request.
- 403: Forbidden, Developer’s key has hit its daily/hourly limit or IP or domain not white-listed.
- 404: HTTP not found
- 412: Precondition Failed, i.e. Mandatory parameter is missing
- 500: Internal Server Error, the request caused an error in our systems.
- 503: Service Unavailable, during our maintenance break or server down-times.
Sample Request:¶
URL:
https://apis.mappls.com/advancedmaps/v1/<access_token>/distanceA?from=34.506172,76.108652&to=28.4586,77.85698&unit=K
Sample Response data:¶
{
"responseCode": 200,
"distance": 692.52185107232,
"unit": "K"
}
For any queries and support, please contact:
Email us at apisupport@mappls.com
Support
Need support? contact us!