Oracle Maps example - custom zoom control

Map zoom:

Instructions

Use the two small buttons above the map area to control the map zoom.

Source code

The JavaScript code is listed below:
	  <script language=javascript>
	  var mapview;
	  
	  function showMap()
	  {	
		var baseURL  = "http://"+document.location.host+"/mapviewer";
		var mapCenterLon = -122.45;
		var mapCenterLat =  37.6706;
		var mapZoom      =  4;  
		var mpoint = MVSdoGeometry.createPoint(mapCenterLon,mapCenterLat,8307);
		mapview = new MVMapView(document.getElementById("map"), baseURL);
		mapview.addMapTileLayer(new MVMapTileLayer("mvdemo.demo_map")); 
		mapview.setCenter(mpoint); 
		mapview.setZoomLevel(mapZoom);    
		mapview.display();  			
	  }
	  
	  function zoomIn() 
	  {
		mapview.zoomIn();
	  }
	  
	  function zoomOut() 
	  {
		mapview.zoomOut();
	  }
	  
	  </script>
	  
    
Here is how the zoomIn() and zoomOut() methods are wired to the two buttons:
    <a href="javascript:zoomOut()"><img src="images/navicons/zoomout.gif" border=0></a>
    <a href="javascript:zoomIn()"><img src="images/navicons/zoomin.gif" border=0></a>