He's refering to the Mapserv object. It may have been called something different earlier in its life.
Yes, the extent can change and there are two reasons: 1) the user has explicitly triggered something that computes a new scale (e.g. a zoom, pan or box zoom) 2) that computed extent must be adjusted to the map size (imagine dragging a tall, thin zoom box) Depending on where you put alerts in mapserv.js you may see changes before or after these cases. I've not implemented accessor functions everywhere so you need to access the object members directly. For example, the extent member contains the extent of the currently displayed map. When you say your zoombox doesn't work. Is that a dBox zoombox or your own code? If I remember back to the days when I started dBox an error like that has to do with the order of coordinates handed to whatever is drawing the rectangle. Perhaps it is expecting minx. miny, maxx, maxy and your sending the reverse? Just a thought. Steve >>> John Smith <[EMAIL PROTECTED]> 10/31/2006 4:22:23 PM >>> map object?? i've popped up using alert(this.extent) but depending on where you insert that alert() in mapserv.js its value changes! i've looked through http://maps.dnr.state.mn.us/tools/dbox/docs/jsdocs/ but can't get the values contained in the map object. is there a dbox guru lurking on this list ;)? i've also tried making my own zoombox but can't get the zoombox to follow the cursor if the cursor is dragged from right-bottom to left-top in the negative direction. any help with that? i admit this is not strictly a mapserver question but then again there's no dbox list. jzs On 10/18/06, Richard Greenwood <[EMAIL PROTECTED]> wrote: > On 10/18/06, John Smith <[EMAIL PROTECTED]> 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 > [EMAIL PROTECTED] > www.greenwoodmap.com
