On Jan 4, 2008 6:24 AM, Steve Lime <[EMAIL PROTECTED]> wrote:
> For completeness here's what has worked for me, as hijacked from ka-map:
>
> var timer=null, delay=2000;
> var paused=false;
>
> function mousePaused(e) {
> var coord = map.getLonLatFromViewPortPx(e.xy);
> ... do something with the coordinate ...
> }
>
> function mouseMove(e) {
> if(timer) clearTimeout(timer);
> if(paused == false)
> self.timer = setTimeout(function(){clearTimeout(timer); paused = true;
> mousePaused(e); paused=false;}, delay);
> }
>
> function mouseOut(e) {
> clearTimeout(timer);
> }
>
> and in the onload function...
>
> map.events.register("mousemove", map, mouseMove);
> map.events.register("mouseout", map, mouseOut);
>
> I can file a ticket if that would help
I implemented an hover handler that more or less does what you showed
us above. See <http://trac.openlayers.org/ticket/1255>.
--
Eric
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users