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
Map Service creates map images based on criterias which you can find below.(URL)
A Map service request must look like this:
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=Map&Typ=output_format
&Latitude=latitude&Longitude=longitude&ZoomLevel=zoom_level&Pan=pan&Width=width
&Height=height&Points=points&Basemap=basemap&UserData=userdata&UserDataId=userdataid
&UserDataStyle=userdatastyle
Key
: LocationBox user key. (Register for user key) Cmd
: LocationBox service name. (Rota)Typ
: Response format. (XML or JSON)Latitude
: Latitude value of center point of the map.Longitude
: Longitude value of center point of the map.ZoomLevel
: Zoom level of the map. (A value between 0 and 14.)Pan
: Pan direction of the map.Pan Values
0 -- No pan
1 -- North
2 -- Northeast
3 -- East
4 -- Southeast
5 -- South
6 -- Southwest
7 -- West
8 -- Northwest
Basemap
: Basemap Types (101, 102, 103)Width
: Width of map image in pixels.Height
: Height of map image in pixels.Points
(optional): Added points are marked on the map image. The points are specified in latitude/longitude format and separated by commas.UserData
: User data type. (POINT, LINE, REGION)UserDataId
: Id of user data.UserDataStyle
: Style of user data.Map service response returns in XML format when the Typ
parameter is set as "XML".
Below is an example for a Map service request which is expected to return a response in XML format .
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=Map&Typ=XML
&Latitude=40.93351&Longitude=29.13095&ZoomLevel=4&Pan=0
&Width=600&Height=400&Points=40.9602/29.0765,40.93351/29.13095&Basemap=101
&UserDataId=1&UserData=REGION&UserDataStyle=10001
The response will be as following:
<response>
<transactionid>LBS_239</transactionid>
<status>0</status>
<errno />
<errdesc />
<mapdata>
<latitude>40.93351</latitude>
<longitude>29.13095</longitude>
<zoomlevel>4</zoomlevel>
<width>600</width>
<height>400</height>
<url>http://www.locationbox.com.tr/locationbox/images/image_id.png</url>
</mapdata>
</response>
Map service response returns in JSON format when the Typ
parameter is set as "JSON".
Below is an example for a Map service request which is expected to return a response in JSON format .
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=Map&Typ=JSON
&Latitude=40.93351&Longitude=29.13095&ZoomLevel=4&Pan=0
&Width=600&Height=400&Points=40.9602/29.0765,40.93351/29.13095&Basemap=101
&UserDataId=1&UserData=REGION&UserDataStyle=10001
The response will be as following:
{ transactionid: LBS_241, status: 0, mapdata:
{ latitude: 40.93351, longitude: 29.13095, zoomlevel: 4, width: 600, height: 400, url: 'http://www.locationbox.com.tr/locationbox/images/image_id.png' } }
Generated map image for the route will be available in the url http://www.locationbox.com.tr/locationbox/images/map_id.png
and will look like the following:
http://www.locationbox.com.tr/locationbox/images/image_id.png
adresinde bulunan harita görseli aşağıdaki gibi olacaktır..
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.
20010 Error processing your request. Please try again soon.
Map could not be generated.
latitude
: Latitude value of center point of the map.longituce
: Longituce value of center point of the map.zoomlevel
: Zoom level of the map.width
: Width of map image in pixels.height
: Height of map image in pixels.url
: Url location of the generated map image.Created images are deleting periodically.
Map Image Service creates map images based on criterias which you can find below.(PNG)
A Map Image service request must look like this:
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=MapImage&Typ=output_format&Latitude=latitude&Longitude=longitude
&Zoomlevel=zoomlevel&Pan=pan&Width=width&Height=height&Points=points&Basemap=basemap_number
Key
: LocationBox user key. (Register for user key) Cmd
: LocationBox service name. (Rota)Typ
: Response format. (XML or JSON)Latitude
: Latitude value of center point of the map.Longitude
: Longitude value of center point of the map.ZoomLevel
: Zoom level of the map. (A value between 0 and 14.)Pan
: Pan direction of the map.Pan Values
0 -- No pan
1 -- North
2 -- Northeast
3 -- East
4 -- Southeast
5 -- South
6 -- Southwest
7 -- West
8 -- Northwest
Basemap
: Basemap Types (101, 102, 103)Width
: Width of map image in pixels.Height
: Height of map image in pixels.Points
(optional): Added points are marked on the map image. The points are specified in latitude/longitude format and separated by commas.Map Image service response returns in PNG format when the Typ
parameter is set as "XML" or "JSON".
Below is an example for a Map Image service request which is expected to return a response in PNG format .
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=MapImage&Typ=XML
&Typ=XML&Latitude=40.93351&Longitude=29.13095&ZoomLevel=10&Pan=0&Width=600&Height=400&Points=40.9602/29.0765,40.93351/29.13095&Basemap=101
The response will be as following:
Map Image service response returns in JSON format when the Typ
parameter is set as "JSON".
Below is an example for a Map Image service request which is expected to return a response in JSON format .
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=MapImage&Typ=XML
&Typ=JSON&Latitude=40.93351&Longitude=29.13095&ZoomLevel=10&Pan=0&Width=600&Height=400&Points=40.9602/29.0765,40.93351/29.13095&Basemap=101
The response will be as following:
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.