Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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".

share|improve this question
up vote 3 down vote accepted

Maybe this tutorial can help:

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

share|improve this answer
That tutorial is for using PHP mapscript (note: current version is at, search the page for 'Full Extent'). If you want "old school" CGI mapserver, try this tutorial: and/or the CGI variables page – neuhausr Jun 13 '11 at 14:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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