Demo

LocationBox JavaScript Demos

Add Route

Add:     Remove:  

Instructions

Use the "Add" button to add an existing route to the map.
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=API
    &Typ=JS"></script>
    
  <script language="JavaScript">
  var mapper  = new IMapper();

  function startup() {
    mapper.initMap(41.1, 29.1, 10);
    mapper.addNavigationPanel();
    return;
} 
     function add() {
      mapper.addRoute('route_1', 2795564, 'ROUTE_PATH', null); 
      return;
    } // add()
    
    function remove() {
      mapper.removeRoute('route_1');      
      return;
    } // remove() 
    
  </script>
					

Button:

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

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