Demo

LocationBox JavaScript Demos

Zoom In - Zoom Out

Zoom In:   Zoom Out: 

Instructions

Use the buttons above the map to zoom in or zoom out.

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, 5);
  return;
} 

function zoomIn() {
  mapper.zoomIn();
}
  
function zoomOut() {
  mapper.zoomOut();
}

</script>
				

Another option; call the mapper.zoomIn and mapper.zoomOut functions through the button.

  <a href="javascript:mapper.zoomIn()"><img src="images/zoomin.gif" /></a>
  <a href="javascript:mapper.zoomOut()"><img src="images/zoomout.gif" /></a>

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