API

LocationBox API

Map Traffic Image

Map Traffic Image Service gives traffic theme on map based on criterias which you can find below.

A MapTrafficImage service request must look like this:

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=MapTrafficmage&Typ=output_format &MinLatitude=minlatitude&MinLongitude=minlongitude
&MaxLatitude=maxlatitude&MaxLongitude=maxlongitude
&Width=width&Height=height&Flow=flow&Event=event&Basemap=basemap


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (MapTrafficImage)
Typ: Response format. (XML or JSON)
MinLatitude: Minimum Latitude value of extent of the map.
MinLongitude: Minimum Longitude value of extent of the map.
MaxLatitude: Maximum Latitude value of extent of the map.
MaxLongitude: Maximum Longitude value of extent of the map.
PathId: Id of your path.
Width: Width of map image in pixels.
Height: Height of map image in pixels.
Flow: Traffic density layer (value must 1 or 0 )
Event: Traffic event layer (value must 1 or 0 )
Basemap: Basemap Types (101, 102, 103 104, 100 (without basemap) )


Response


Map service response returns in image format when the Typ parameter is set as "XML" or "JSON".

Below is an example for a Map service request which is expected to return a response in PNG format .

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=MapTrafficImage&Typ=XML &MinLatitude=40.740817&MinLongitude=28.844374&MaxLatitude=41.238385&MaxLongitude=29.283827
&Width=600&Height=400&Flow=1&Event=1&Basemap=101


Generated map image will look like the following:



Notes

Created images are deleting periodically.