.codeblock { -moz-background-clip:border; -moz-background-inline-policy:continuous; -moz-background-origin:padding; background:#F5F4EE none repeat scroll 0 0; border:2px dotted #DDDDDD; color:#06263C; font-family:courier,monospace; width:100%; } .picture { background-color: #F9F9F9; border: 1px solid #CCCCCC; padding: 3px; font: 11px/1.4em Arial, sans-serif; } .picture img { border: 1px solid #CCCCCC; vertical-align:middle; margin-bottom: 3px; } .right { margin: 0.5em 0pt 0.5em 0.8em; float:right; } .left { margin: 0.5em 0.8em 0.5em 0; float:left; }

Now that we've completed and released the new Geocoding service, Directions Service, and Static Map Service, we're moving on to the next round of web services. The first one up to the plate is the new Traffic Service.

This is actually the second Beta release, and we have three functions completed now: One to get a list of markets, one to get a list of the current traffic incidents in a given area, and a third to get a raster image of the traffic flow conditions to overlay on a map.

The first function, /traffic/v1/markets?, is a simple call to get a list of the markets for which we have traffic. There are no parameters (except your appkey). It simply returns a list of market names, a Center Latitude/Longitude, an icon to use, and a suggested bounding box for zooming in. We use this function to show the traffic markets on zoomed-out maps, and create the "zoom to market" links in the market infoWindows.

Main Markets
Showing the Markets feed on a map.

The second function,/traffic/v1/incidents?, lets you request all incidents within a given bounding box. You can filter on which incident types you want returned ("Construction" for example). Each incident provides type and location details, an appropriate icon to use, a short and full description, and timing/duration info.

Incidents in a market
Showing the incidents on a map.

The third function,/traffic/v1/flow?, returns a transparent raster image of color-coded traffic flow for a given MapState. A MapState is a core object of our mapping SDKs that contains the map center-point, the zoom level, and the height/width of the map.

Incidents in a market
Showing both incidents and flow on a map.

The service is all part of the new platform we've been building out, so it comes with the ability to GET with Key-value pairs, or GET or POST with JSON or XML, and receive your response in a different format to your request (eg: send in XML, get it returned as JSON).

Obviously we're not done yet. An important thing for us here is to make sure the exposed service is consistent with the other services we've recently released (the geocoding, directions, and static map). So - please, please let us know if you find any inconsistencies in the object / node names in the request / return, compared to the others.

More details are, as always, available on our Developer Network Beta Release page.

If you haven't tried any of our new services and SDKs in Beta yet, you can sign up for an appKey here.

Stay tuned...more to follow soon.