CGI or Mapscript

Richard Greenwood richard.greenwood at GMAIL.COM
Wed Oct 18 21:49:03 EDT 2006


On 10/18/06, John Smith <jayzee.smith at gmail.com> wrote:
> thks. yeah dbox is cool but i got another question- i'm trying to output
> [imgext] and other cgi variables from dbox. how do i grab them? i'd really
> want to use the backward and forward browser buttons. i think navigation is
> way cooler that way.

When you reload a whole page, you can get mapserver (on the server) to
provide values for variables in [...] but with dBox you are usually
not reloading the whole page from the server, you are usually only
requesting a new map image. So the new extent needs to be calculated
on the client (the browser).   Thanks to mapserv.js, this is no harder
than requesting the new values from the server, and a lot more
elegant. The extent, scale, size, etc. are contained in the map
object, and are updated each time you make a new map request.

But by not relaoding the whole page, the browser's back and forward
buttons don't do what you would expect, and you can not book mark the
URL. There are a couple thing you might try: you could maintain a
"history" stack and add your own back & forward buttons to your user
interface (ArcIMS, MapBuilder, and many others do this), or you could
try pushing the current map parameters into the browser's history.
Don't know what problems you'd encounter, but that always seemed more
elegant to me. I just haven't gotten around to trying to implemet it.

Rich

-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com



More information about the mapserver-users mailing list