API

LocationBox API

GetElevation

GetElevation Service gives closest building altitude based on some criterias which you can find below.

A GetElevation request must look like this:

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=GetElevation&Typ=output_format&Latitude=latitude&Longitude=longitude


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (GetElevation)
Typ: Response format. (XML or JSON)
Latitude: Building's latitude information.
Longitude: Building's longitude information.

Response Parameters


XML Response

GetElevation response returns in XML format when the Typ parameter is set as "XML".

Below is an example for a GetElevation request which is expected to return a response in XML format .

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=GetElevation&Typ=XML&Latitude=41.1&Longitude=29.1

The response will be as following:

 <transactionid>LBS_31531</transactionid>
 <status>0</status>
  <latitude>41.1</latitude>
  <longitude>29.1</longitude>
  <elevation>65.0</elevation>


JSON Response

POI Search response returns in JSON format when the Typ parameter is set as "JSON".

Below is an example for a GetElevation request which is expected to return a response in JSON format .

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=GetElevation&Typ=JSON&Latitude=41.1&Longitude=29.1

The response will be as following:


{ "transactionid": "LBS_31531", "status": 0, "latitude": 41.1, "longitude": 29.1, "elevation": 65.0 }

transactionid: The id of response given by LocationBox Service. Every response can be tracked using transactionid when necessary.
status: Response format. (XML or JSON)

Status Codes
0 -- Success
1 -- Fail

errno: Error code
errdesc: Error definition

Error Codes
10001 Error processing your request. Please try again soon.
Cmd parameter is misspelled/not found.
10011 Error processing your request. Please check the Cmd parameter.
Cmd is not specified.
10012 Error processing your request. Please check the Key parameter.
Key is not specified.
10013 Error processing your request. Please check the Key parameter.
Key is invalid.
20012 No data found.