dBox Problem...

Stephane Lessard LESSARDST at DFO-MPO.GC.CA
Tue Sep 6 13:59:08 EDT 2005


Paul,
 
I remember I had a couple of errors when I started using DBox... I made some
changes to the javascript code, and I am quite sure one of these changes
corrected the problem you mention.
 
In the "dBox_mousemove" function, try replacing the following line:
 
  var t = e.target.parentObject;

with:
 
  var t = this.object;
  if (!t) return;
 
Where: "this.object" was declared in the constructor, and initialized in the
"mousedown" function, as follows:
 
  var t = e.target.parentObject;
  this.object = t;  // Here it points to the correct target
 
What happens is that the Source (or target) of the mousemove event changes
when your cursor leaves the map area, so that "target.parentObject" is not
the DBox object anymore...
 
Maybe someone has a better workaround though... This one works great with
IE, but not with FireFox.
 
Hope this helps!
 
Stephane Lessard

 


  _____  

De : Paul james [mailto:pauljame at GMAIL.COM] 
Envoyé : 5 septembre 2005 14:41
À : MAPSERVER-USERS at LISTS.UMN.EDU
Objet : [UMN_MAPSERVER-USERS] dBox Problem...


Hi... I´m using this sample :
http://www.dnr.state.mn.us/maps/landview.html
<http://www.dnr.state.mn.us/maps/landview.html> 
 
But when I draw a box until the limits, an error hapened in javascript:
"'drag' is null ... "
 
Any idea?
 
Thank you

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050906/287a57ce/attachment.html


More information about the mapserver-users mailing list