4

I need to put checkbox with name "Zoom to extents" which will zoom to full map extent (first extent which appears by opening web page). Can someone help me? In mapfile I have this "EXTENT 563090 5072655 588220 5093325".

3

Maybe this tutorial can help: http://docs.huihoo.com/mapserver/5.2.1/mapscript/php/by_example.html

This code will zoom out, zoom in, pan, and restore to full extent the image displayed in the previous example.

1
0

you can do it by changing BBOX in URL with javascript like this for example,

HTML:

<div onclick="func()>
   <label><input type="checkbox" id="checking">Zoom to extent</label>
</div>

javascript:

function func(){
    document.getElementById("imageID").src = "http://localhost/cgi-bin/mapserv.exe?map=../MAP.map....&BBOX=[full extent]&..."
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.