Note that this patch has been applied to both trunk/openlayers<br>
and branches/openlayers/2.2, so if you are working from trunk<br>
an svn update should do the trick, and it will be part of the next <br>
release candidate as well.<br>
<br>
Ticket #372 closed (<a href="http://trac.openlayers.org/ticket/372#preview">http://trac.openlayers.org/ticket/372#preview</a>)<br>
<br>
Great work everyone!<br>
--Erik<br><br><div><span class="gmail_quote">On 10/24/06, <b class="gmail_sendername">Jeff Dege</b> &lt;<a href="mailto:jdege@korterra.com">jdege@korterra.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Don't kick yourself too hard - the description in the doc file dates<br>from when the granularity setting worked the way you had thought it had<br>worked.&nbsp;&nbsp;I updated the code, and forgot to update the docs.<br><br>I've submitted a patch to the docs so that the description for the
<br>granularity setting matches what the granularity setting does do,<br>instead of what it used to do back when the control wasn't working.<br><br>And I've bumped the default value from 1 to 10 - which should make even<br>
folks with fast mouses update the display.<br><br>You can, if you like, set granularity to &gt; window size, and have it<br>update the display all the time.&nbsp;&nbsp;Personally, I really hate jerky mouse<br>movement, but others might not be as sensitive.
<br><br>&gt; -----Original Message-----<br>&gt; From: <a href="mailto:users-bounces@openlayers.org">users-bounces@openlayers.org</a><br>&gt; [mailto:<a href="mailto:users-bounces@openlayers.org">users-bounces@openlayers.org
</a>] On Behalf Of Alan U<br>&gt; Sent: Tuesday, October 24, 2006 10:22 AM<br>&gt; To: <a href="mailto:users@openlayers.org">users@openlayers.org</a><br>&gt; Subject: Re: [OpenLayers-Users] Mouse position control<br>&gt;<br>
&gt;<br>&gt; I take it all back (almost!)<br>&gt; There isn't necessarily a problem with the code, but I always<br>&gt; have my mouse<br>&gt; on fast pointer movement. This was never giving me a<br>&gt; mouse-movement &lt; 2
<br>&gt; pixels.<br>&gt;<br>&gt; DOH!!<br>&gt;<br>&gt; Turning down the sensitivity of my mouse and the code works<br>&gt; (of course). It<br>&gt; only updates the control display if the mouse-movement is<br>&gt; small enough and
<br>&gt; mine wasn't.<br>&gt; Therefore, the default granularity should be raised or anyone<br>&gt; running the<br>&gt; examples/default code will see no feed back from the<br>&gt; mousePosition control!<br>&gt; My final points about not being able to get latlong values
<br>&gt; when moving the<br>&gt; mouse slowly are rubbish too.<br>&gt;<br>&gt; Alan (gently kicking myself)<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; Alan U wrote:<br>&gt; &gt;<br>&gt; &gt; Taking the code from the trunk, the mouse position control
<br>&gt; seems a bit<br>&gt; &gt; wrong. I was getting no feedback in FF and only feedback in<br>&gt; IE when making<br>&gt; &gt; a click on the map.<br>&gt; &gt;<br>&gt; &gt; In the redraw function I changed:<br>&gt; &gt;
<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (this.lastXy == null ||<br>&gt;
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Math.abs(evt.xy.x - this.lastXy.x) &gt;<br>&gt; this.granularity ||<br>&gt;
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Math.abs(evt.xy.y - this.lastXy.y) &gt;<br>&gt; this.granularity)<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { //don't update<br>&gt; &gt;<br>&gt; &gt; to:<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (this.lastXy == null ||<br>&gt;
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Math.abs(evt.xy.x - this.lastXy.x) &lt;<br>&gt; this.granularity ||<br>&gt;
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Math.abs(evt.xy.y - this.lastXy.y) &lt;<br>&gt; this.granularity)<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {//don't update<br>&gt; &gt;<br>&gt; &gt; Note the greater/less than signs.<br>&gt; &gt;<br>&gt; &gt; Also, with the granularity value even set to 1, moving
<br>&gt; slowly across the<br>&gt; &gt; map causes no update of the xy coords in the control. Though this is<br>&gt; &gt; designed for, it is not intuitive imo. If you are trying to get a<br>&gt; &gt; coordinate precisely, then it is highly likely you will be
<br>&gt; moving the<br>&gt; &gt; mouse below the granularity level: thus I think the default<br>&gt; should be 0.<br>&gt; &gt;<br>&gt; &gt; Alan<br>&gt; &gt;<br>&gt;<br>&gt; --<br>&gt; View this message in context:<br>&gt; 
<a href="http://www.nabble.com/Mouse-position-control-tf2501061.html#a6974998">http://www.nabble.com/Mouse-position-control-tf2501061.html#a6974998</a><br>&gt; Sent from the OpenLayers Users mailing list archive at <a href="http://Nabble.com">
Nabble.com</a>.<br>&gt;<br>&gt; _______________________________________________<br>&gt; Users mailing list<br>&gt; <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>&gt; <a href="http://openlayers.org/mailman/listinfo/users">
http://openlayers.org/mailman/listinfo/users</a><br>&gt;<br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/users">
http://openlayers.org/mailman/listinfo/users</a><br></blockquote></div><br>