<head><title>zoom1.html</title>
<script src=../window.js></script>
<script src=../examples.js></script>
</head>
<body>
<script>
w1 = new win(10,100,200,200,"Zoom")
w1.setServerURL(MSURL)
w1.setVar("map",MSMAP)
w1.setVar("map_countries_class_color","255 0 0")
w2 = new win(220,100,200,200,"Pan")
w2.setServerURL(MSURL)
w2.setVar("map",MSMAP)
w2.setVar("map_countries_class_color","0 255 0")
w3 = new win(100,320,200,200,"Click")
w3.setServerURL(MSURL)
w3.setVar("map",MSMAP)
w3.setVar("map_countries_class_color","0 0 255")
function submitW1() {
w1.setVar("mapsize",w1.contentWidth + " " + w1.contentHeight)
w1.submit()
}
function submitW2() {
w2.setVar("mapsize",w2.contentWidth + " " + w2.contentHeight)
w2.submit()
}
function submitW3() {
w3.setVar("mapsize",w3.contentWidth + " " + w3.contentHeight)
w3.submit()
}
function submitAll() {
submitW1()
submitW2()
submitW3()
}
w1.setExecOnResize(submitW1)
w2.setExecOnResize(submitW2)
w3.setExecOnResize(submitW3)
function showZoom() {
alert("you zoomed")
}
function showPan() {
alert("you panned")
}
function showClick() {
alert("you clicked")
}
function setZoomPanClick() {
globalZoom(showZoom,w1)
globalPan(showPan,w2)
globalClick(showClick,w3)
}
</script>
<input type=button value="Submit three maps" onclick="submitAll()">
<input type=button value="Set Zoom/Pan/Click" onclick="setZoomPanClick()">
</body>