[Mapserver-users] dBox questions.

Jason M. Nielsen jnielsen at aero-graphics.com
Tue Jan 20 16:20:57 PST 2004


I grabbed the example setup that makes use of the demo and have been slowly but
surely adapting the itasca_adds_dhtml.html to my own needs. I am running into a
few problems though.

1)The generation of scalebars only happens once in Mozilla or IE. After you zoom
via a rubberband box they display. After that they never do. In NS 4.7 they
redraw but print some pretty wacky scales. After looking through the code and
comments it is indicated that predraw() is called automatically and it indeed
is. Has anyone else seen this happen? The code looks fine, I see no errors in
the console yet its not redrawing the scalebars. In addition the legend is
called to be updated via predraw and it seems to work fine.

2)The [program] variable is used in many places and I have it set at the
sametime I set several other variables. All of these variables are usable in
other pages but [program] refuses to be replaced inline with its value. Although
the use of getargs and referencing args.program works fine. Is there anything
special about the program variable? I literally have 2 vars set before and 2
after in a form and they all work even in the same pages I attempt to use [program].

3)Im a bit confused on just how one would get a coordinate readout in the
window.status bar. 
  function mousemove_handler(name, x, y) {
    window.status = "UTM Coordinates: x=" + Math.round(Number(ms.extent[0] +
x*ms.cellsize)) + " and y=" + Math.round(Number(ms.extent[3] - y*ms.cellsize));
  }

Its a function included with the demo. A bit of research indicates in dbox.js
mousemove_handler will be called if it exists seemingly as part of default event
handlers implemented in dbox. Basically I cant seem to get this to work. Any hints?

I have the same issues using the default workshop archive as well.

Thanks, Jason

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/



More information about the MapServer-users mailing list