[OpenLayers-Users] Mouse position control

Erik Uzureau euzuro at gmail.com
Tue Oct 24 09:00:58 EDT 2006


Alan,

This seems strange to me. Does it work in the following example for you?
http://www.openlayers.org/dev/examples/controls.html

It would help us to understand the situation better if you could send us a
link
to the page you are developing or the code that  is showing the problem.

Cheers,

Erik

On 10/24/06, Alan U <alan.underwood at hotmail.co.uk> wrote:
>
>
> Taking the code from the trunk, the mouse position control seems a bit
> wrong.
> I was getting no feedback in FF and only feedback in IE when making a
> click
> on the map.
>
> In the redraw function I changed:
>
>             if (this.lastXy == null ||
>                 Math.abs(evt.xy.x - this.lastXy.x) > this.granularity ||
>                 Math.abs(evt.xy.y - this.lastXy.y) > this.granularity)
>             { //don't update
>
> to:
>             if (this.lastXy == null ||
>                 Math.abs(evt.xy.x - this.lastXy.x) < this.granularity ||
>                 Math.abs(evt.xy.y - this.lastXy.y) < this.granularity)
>             {//don't update
>
> Note the greater/less than signs.
>
> Also, with the granularity value even set to 1, moving slowly across the
> map
> causes no update of the xy coords in the control. Though this is designed
> for, it is not intuitive imo. If you are trying to get a coordinate
> precisely, then it is highly likely you will be moving the mouse below the
> granularity level: thus I think the default should be 0.
>
> Alan
> --
> View this message in context:
> http://www.nabble.com/Mouse-position-control-tf2501061.html#a6972149
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20061024/12d4ae07/attachment.html


More information about the Users mailing list