Zoom to Rectangle
Instructions
Use the "Start" button to zoom in to a predefined rectangular region.
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, 4);
mapper.addNavigationPanel();
return;
}
function zoom() {
mapper.showMapRectangle(41.01, 29.05, 41.06, 29.15);
return;
}
</script>
Button:
<a href="javascript:zoom()"
><img src="images/add.gif" border=0></a>
Download working pageRemember that you need to use your key code as Key attribute.