<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16788" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=631482906-28012009>Hi
All,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=631482906-28012009>I've recently
upgraded to 2.7 and noticed a change to the DragPan class - in particular
the addition of a timeout interval of 25ms to allow smoother panning when
dragging the mouse. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=631482906-28012009>This works great,
but w</SPAN></FONT><FONT face=Arial size=2><SPAN class=631482906-28012009>hen
the MousePosition control is used in conjunction with this I see many
unnecessary calcs and redraw() calls which, a) slow down the map
and b) incorrectly show flickering lon/lat values that are being called during
that 25ms interval. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=631482906-28012009>Am I right to assume
this is a bug? I have searched the tickets and Mailing list and not found
anything about it so far. Happy to create a ticket for it if it is a new
one.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=631482906-28012009>I have written a
quick and (very) rudimentary fix for this in my dev area which sets a
new global flag 'map.currentlyPanning' and checks it before attempting to
execute the redraw() code in MousePosition.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009>DragPan.js:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=631482906-28012009> panMap:
function(xy) {<BR> this.panned =
true;<BR> this.map.currentlyPanning =
true;</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV>
<DIV><FONT><SPAN class=631482906-28012009><FONT face=Arial
size=2>(...)</FONT></DIV>
<DIV><BR><FONT face=Arial size=2> panMapDone: function(xy)
{<BR> if(this.panned)
{<BR>
this.panMap(xy);<BR>
this.panned = false;<BR><SPAN
class=631482906-28012009>
</SPAN>this.map.currentlyPanning = false;<BR></FONT></DIV>
<DIV><SPAN class=631482906-28012009><FONT face=Arial
size=2>(...)</FONT></SPAN></DIV></SPAN></FONT>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009>MousePosition.js:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=631482906-28012009>
redraw: function(evt) {<BR>
if(!this.map.currentlyPanning)
{<BR> var
lonLat;</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009>(...)</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=631482906-28012009>This works, but I
know that there is probably a much better way and would probably be best
to use the 'panning' flag already set up in that class but
I'm not sure how it will be possible to access it since it's private to that
class?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=631482906-28012009>Looking forward to
your input on this one.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=631482906-28012009>Best
regards,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009>Matt</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=631482906-28012009></SPAN></FONT> </DIV></BODY></HTML>