Demo

LocationBox JavaScript Demos

Show Traffic Info

Add:  

Instructions

Use the "Show" button to show traffic info on the map. Zoom into the map for details.
See the JavaScript API for more information.

Source Code

The Javascript code for the above map is:

<script language="Javascript" 
	src="http://www.locationbox.com.tr/locationbox/services?
	Key=key&Cmd=APIV2&Typ=JS"></script>

<script language="JavaScript">
var mapper  = new IMapper();

function startup() {
  mapper.initMap(41.1, 29.1, 8);
  mapper.addNavigationPanel();
  return;
} 

    function show() {          
      mapper.showTrafficView();
      mapper.addTrafficEvents();
      return;
    }

    
</script>

Buttons:

  <a href="javascript:show()"><img src="images/add.gif" border=0></a>

					
Download working page
Remember that you need to use your key code as Key attribute.