Service API
Address
POI
Route
Map
Indoor
Dynamic Information
Campaign
Demography
Traffic
User Data
Risk
Analysis
- Spatial Analysis
- Add Service Area
- Add Buffered Line To User Region
- Add Buffered Route To User Region
- Add Route To User Line
LocationBox API
Cluster Points Service combine markers on map based on criterias which you can find below.
A Cluster service request must look like this:
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=ClusterPoints&Typ=output_format&Cluster=Number of Cluster&Coors=coordinates
Key
: LocationBox user key. (Register for user key) Cmd
: LocationBox service name. (Rota)Typ
: Response format. (XML or JSON)Cluster
: Number of Cluster for specified coordinates.Coors
: Coordinates that wanted to be clustered.Cluster service response returns in XML format when the Typ
parameter is set as "XML".
Below is an example for a Cluster service request which is expected to return a response in XML format .
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=ClusterPoints&Typ=XML
&Cluster=5&Coors=A/29.13095/40.96958,B/29.18985/40.02025,C/29.409/40.795,
D/29.5485/40.954,E/29.110655/40.9663799,F/29.16678341/40.926578923,G/29.5596/40.976827
The response will be as following:
<response>
<transactionid>LBS_239</transactionid>
<status>0</status>
<errno />
<errdesc />
<clusters>
<id>1</id>
<latitude>40.13095</latitude>
<longitude>29.02773</longitude>
<items>
<item>
<itemid>1</itemid>
<alias>A</alias>
<latitude>40.9095</latitude>
<longitude>29.6773</longitude>
<distance>0.004885</distance>
</item>
<item>
...
</item>
</items>
</clusters>
</response>
Cluster service response returns in JSON format when the Typ
parameter is set as "JSON".
Below is an example for a Cluster service request which is expected to return a response in JSON format .
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=ClusterPoints&Typ=JSON
&Cluster=5&Coors=A/29.13095/40.96958,B/29.18985/40.02025,C/29.409/40.795,
D/29.5485/40.954,E/29.110655/40.9663799,F/29.16678341/40.926578923,G/29.5596/40.976827
The response will be as following:
{
"transactionid": "LBS_44033",
"status": 0,
"clusters": [
{
"id": 1,
"latitude": 40.99253463745117,
"longitude": 29.027734756469727,
"items": [
{
"itemid": 1,
"alias": "A",
"latitude": 40.9881706237793,
"longitude": 29.029930114746094,
"distance": 0.004885101154523397
},
{
"itemid": 2,
"alias": "E",
"latitude": 40.99689865112305,
"longitude": 29.02553939819336,
"distance": 0.004885101154523397
}
]
},
{
"id": 2,
"latitude": 41.004188537597656,
"longitude": 29.036705017089844,
"items": [
{
"itemid": 1,
"alias": "F",
"latitude": 41.00178146362305,
"longitude": 29.038740158081055,
"distance": 0.003152111034425788
},
{
"itemid": 2,
"alias": "G",
"latitude": 41.006591796875,
"longitude": 29.034669876098633,
"distance": 0.0031491989470730235
}
]
},
{
"id": 3,
"latitude": 40.96783447265625,
"longitude": 29.088769912719727,
"items": [
{
"itemid": 1,
"alias": "D",
"latitude": 40.9610481262207,
"longitude": 29.08156967163086,
"distance": 0.009894340285287904
},
{
"itemid": 2,
"alias": "C",
"latitude": 40.96894836425781,
"longitude": 29.09579086303711,
"distance": 0.007108762048288668
},...
]
}
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 codeerrdesc
: Error definitionError 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.