API

LocationBox API

TMCHatInfo

TMCHatInfo Service gives information about speed limits based on criterias which you can find below.


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (TMCHatInfo)
Typ: Response format. (XML or JSON)
TmcKod: TMC Code.
ZoomLevel: Zoom Level of Map
Geometry: You can get geometry of TMC Code. (Geometry Package Required for your LocationBox Key.)
Encode: Encoded geometry.
SRID: Map projection system for geometry.
Reverse: Also avalaible reverse geometry for TMC Code.

Response Parameters


XML Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=TMCHatInfo&Typ=XML&TmcKod=41&ZoomLevel=6&Geometry=1&Encode=0&SRID=8307&Reverse=0

The response will be as following:


<response>
 <transactionid>LBS_50366390</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <tmchat>
  <tmccode>41</tmccode>
  <frc>1</frc>
  <speedlimit>57</speedlimit>
  <geometry>
   <ordinates>28.93014216,41.03269596,28.9296491676311,41.0324442710198,...,28.9252326558739,41.0289386237144</ordinates>
  </geometry>
 </tmchat>
</response>

JSON Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=TMCHatInfo&Typ=JSON&TmcKod=41&ZoomLevel=6&Geometry=1&Encode=0&SRID=8307&Reverse=0

The response will be as following:


{ "transactionid": "LBS_50366396", "status": 0, "tmchat": { "tmccode": "41", "frc": "1", "speedlimit": 58, "geometry": [ 28.93014216,41.03269596,28.9296491676311,41.0324442710198,...,28.9252326558739,41.0289386237144 ] } }

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.
20022 City is not found.
20023 Town is not found.
20024 District is not found.

tmccode: TMC code.
frc: Type of tmc road.
speedlimit: Speed limit of TMC.
geometry: Geometry of TMC road.



TMCHatListWithExtent

TMCHatListWithExtent Service gives information about speed limits withs specific extention based on criterias which you can find below.


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (TMCHatListWithExtent)
Typ: Response format. (XML or JSON)
MinLatitude: Minimum Latitude of the bounding box.
MinLongitude: Minimum Longitude of the bounding box.
MaxLatitude: Maximum Latitude of the bounding box.
MaxLongitude: Maximum Longitude of the bounding box.


XML Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=TMCHatListWithExtent&Typ=XML&MinLatitude=37.65940398&MinLongitude=31.23677412&MaxLatitude=39.31071399&MaxLongitude=33.444854

The response will be as following:


<response>
 <transactionid>LBS_50366390</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <tmchat>
  <tmccode>41</tmccode>
  <frc>1</frc>
  <speedlimit>57</speedlimit>
 </tmchat>

..
 <transactionid>LBS_50366390</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <tmchat>
  <tmccode>-7078</tmccode>
  <frc>4</frc>
  <speedlimit>82</speedlimit>
 </tmchat>
</response>

JSON Response

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

Below is an example for an address element (town list) request which is expected to return a response in JSON format .

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=TMCHatListWithExtent&Typ=JSON&MinLatitude=37.65940398&MinLongitude=31.23677412&MaxLatitude=39.31071399&MaxLongitude=33.444854

The response will be as following:


{ "transactionid": "LBS_50367388", "status": 0, "items": [ { "tmccode": "7067", "frc": "3", "speedlimit": 58 },
...
{ "tmccode": "-7078", "frc": "4", "speedlimit": 86 } ] }


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.
20022 City is not found.
20023 Town is not found.
20024 District is not found.

tmccode: TMC code.
frc: Type of tmc road.
speedlimit: Speed limit of TMC.

TMCHatSearch


You can use TMCHatSearch for getting nearest TMC code. Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (TMCHatSearch)
Typ: Response format. (XML or JSON)
Latitude: Latitude of nea.
Longitude: Longitude of nea.


XML Response

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

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

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

The response will be as following:


<response>
 <transactionid>LBS_50366390</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <items>
  <tmchat>
   <tmccode>41</tmccode>
   <frc>1</frc>
   <speedlimit>57</speedlimit>
  </tmchat>
 </items>
</response>

JSON Response

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

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

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

The response will be as following:


{ "transactionid": "LBS_31938", "status": 0, "items": [ { "tmccode": "825", "frc": "5.1", "speedlimit": 150 } ] }

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.
20022 City is not found.
20023 Town is not found.
20024 District is not found.

tmccode: TMC code.
frc: Type of tmc road.
speedlimit: Speed limit of TMC.