javascript rectangle co-ordinates

Bob Bruce covariance at SHAW.CA
Tue Feb 1 10:37:42 EST 2005


Solomon:
         I would recommend that you use the dbox JavaScript classes if you
can do so. I tried programming this and it is a difficult thing to get
right and my own JavaScript code sometimes fails depending upon which
direction you drag the box and which browser you are in. I did find that I
needed to save the mouse coordinates from the onMouseMove event handler in
order to keep them. But my case was probably special because I was also
trying to use an client-side imagemap as well as handling mouse events
separately.

   You can get the dbox classes from the proceedings of the 2004 MUM
website at: http://www.omsug.ca/dl/osgis2004/box_presentation.zip
when you unzip this you will find a folder called presentation, this has
instructions on using both jBox and dbox, I found it very helpful.

   If you still want to pursue developing your own JavaScript code then
let me know and I can provide you with my own code, this may help you to
make progress in this.

     Bob Bruce



More information about the mapserver-users mailing list