API

LocationBox API

Add Buffered Line To User Region

Add Buffered Line To User Region Service combine special line and region on database that user gave based on criterias which you can find below.

AddBufferedLineToUserRegion request must look like this:

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=AddBufferedLineToUserRegion&Typ=output_format&Id=regionId&LineId=lineid&Name=regionName
&Coors=linecoors&BufferDist=bufferdistance
&String1=string&String2=string2&Number1=number1&Number2=number2


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (AddBufferedLineToUserRegion)
Typ: Response format. (XML or JSON)
Id: ID of region.
LineId: ID of line.
Coors: Coors of line.(If you want to use PathId you cannot give Coors parameter)
BufferDist: Buffer distance. (meter)
Name (Optional): Name of buffered line.
Type (Optional): Type of bufered line.
String1 (Optional) : Description of buffered line.
String2 (Optional): Description of buffered line.
...
String9 (Optional): Description of buffered line.
Number1 (Optional): Description of buffered line.
Number2 (Optional): Description of buffered line.
...
Number9 (Optional): Description of buffered line.

Response Parameters


XML Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=AddBufferedLineToUserRegion&Typ=XML&Id=12&LineId=15&Name=Test
&Coors=29.0606,40.9889,29.1609,40.9858,29.1624,40.9453,29.0792,40.9631,29.0606,40.9889
&BufferDist=200&String1=www.infotech.com.tr&String2=kurumsal@infotech.com.tr&Number1=1&Number2=2


The response will be as following:

<response>
 <transactionid>LBS_37538710</transactionid>
 <status>0</status>
 <id>12</id>
 <errno />
 <errdesc />
</response>

JSON Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=AddBufferedLineToUserRegion&Typ=XML&Id=12&LineId=15&Name=Test
&Coors=29.0606,40.9889,29.1609,40.9858,29.1624,40.9453,29.0792,40.9631,29.0606,40.9889
&BufferDist=200&String1=www.infotech.com.tr&String2=kurumsal@infotech.com.tr&Number1=1&Number2=2


The response will be as following:


{ "transactionid": "LBS_50372229", "status": 0, "id": "12" }

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.