<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  
</head>
<body text="#000000" bgcolor="#ffffff">
<br>
Oops, as I tried to say: I came across this problem a while ago, and
came up with something like this (as was outlined by Shawn)<br>
<br>
MouseOver = OpenLayers.Class({<br>
��� map: null,<br>
��� timer: null,��� <br>
��� prevXY: null,<br>
��� <br>
<br>
��� /**<br>
���� *<br>
���� *<br>
���� * @param map the map<br>
���� * @param options options<br>
���� */<br>
��� initialize: function(map, options) {<br>
������� OpenLayers.Util.extend(this, options);<br>
������� this.map = map;<br>
<br>
��� },<br>
<br>
��� /**<br>
���� *<br>
���� */<br>
��� activate: function () {<br>
������� if (this.active) {<br>
����������� return false;<br>
������� }<br>
������� this.map.events.register("mousemove", this,
this.mouseMoveListener);<br>
������� this.active = true;<br>
������� return true;<br>
��� },<br>
<br>
<br>
��� /**<br>
���� *<br>
���� */<br>
��� deactivate: function (notremove) {<br>
������� if (!notremove) {<br>
����������� this.removePopups();<br>
������� }<br>
������� if (this.active) {<br>
����������� this.map.events.unregister("mousemove", this,
this.mouseMoveListener);<br>
����������� this.active = false;<br>
����������� return true;<br>
������� }<br>
������� return false;<br>
��� },<br>
<br>
��� /**<br>
���� *<br>
���� * Listens for mouse movements, and uses timers to detect a "mouse
stop event"<br>
���� *<br>
���� * @param evt<br>
���� */<br>
��� mouseMoveListener: function(evt) {<br>
������� //disable if shiftKey is presses (as we do not want to
interfere with zooming)<br>
������� if (!evt.shiftKey) {<br>
����������� if (this.timer) {<br>
��������������� clearTimeout(this.timer);<br>
����������� }<br>
����������� that = this;<br>
<br>
����������� this.sleep(100, function () {<br>
��������������� this.timer = null;<br>
��������������� that.mouseStop(evt);<br>
����������� });<br>
������� }<br>
��� },<br>
<br>
��� /**<br>
���� * sleeps (used to detect mouse stops)<br>
���� *<br>
���� * @param ms millisecs to sleep<br>
���� * @param callback callback function<br>
���� */<br>
��� sleep: function (ms, callback) {<br>
������� this.timer = setTimeout(callback, ms);<br>
��� },<br>
<br>
<br>
��� /**<br>
���� *<br>
���� * Handles the "mouse stop event"<br>
���� *<br>
���� * @param evt the event (actually a mousemove event<br>
���� */<br>
��� mouseStop: function(evt) {<br>
������� //stupid check because IE does not handle mousemove correctly
(or i f*** things up)<br>
������� if (this.prevXY) {<br>
����������� if (evt.xy.x != this.prevXY.x &amp;&amp; evt.xy.y !=
this.prevXY.y) {<br>
��� ��� //get the position we stopped at, and current map scale<br>
��������������� var pos = this.map.getLonLatFromPixel(evt.xy);<br>
��� ��� var scale = this.map.getScale(); <br>
��� ��� console.log("mouse stopped at " + pos.toString() + ", scale = "
+ scale.toString());<br>
����������� }<br>
������� }<br>
������� //update this so that the check for if we actually have moved
between two mouse stops works<br>
������� //f*** ie!<br>
������� this.prevXY = evt.xy;<br>
��� }<br>
<br>
});<br>
<br>
On 02/25/2010 04:19 PM, Sveen Atle Frenvik (Geomatikk IKT) wrote:
<blockquote
 cite="mid:02656758FFFCDF4D9CC79BC33EBC55F880E446@TD-VIRT-EX-01.geomatikk.ad"
 type="cite">
  <pre>REMOVED_BY_THE_EXCHANGE_EMAIL_SCANNING_SERVICE_008BC5E7_55E9F026D000000
GUID::= 695731b2-611a-4e58-847c-ac52466d2628
PATH::= !CRYPT!840D757A8080D0C76A26FF81F3FA70208F6A98816EB00D12DB336E0E9CCCAFD62668D88A1AD46A6A8FC2A126F4F9B166A5C3D60A992565F4A7A65F24E2C229CDD2D32107744!84073BA692635189B9E1EB87F821836BC06D0663E3042BDD857008A3FBAE037649B6848CB28DD632798FA6CFB4288F0B6C003C8299803A022B95E1338DC6BC196B93D1A0746!84079C28BD1DCE1D04C4F0751E1A4393044A085499E9351764FC37C335DD7FC8CD50D56FA3B88F70DC2396BEA9F78B7A8B0D82273E7F88899DA38618626B298DA104E687648!840C88983C6599DB209E6D3F6FC0F741086A4841236840ACC3177236D83C5D1BFA3E4B30FB51FA0A64C113CA14ED3E2AE3581F69C0E8DB217184FEF2849388AD90D4015763F!84021F62F7265D89AD27638E600989B2A9130AE119C3309D33CD1BFB5F0EF09D69412414EC78FE17C420C9603F09599DDE2F3F32B069991C145EFDA5E4521806F73496D0044!840FE51F8438A8EC288F84D2F5D180C864243F38C17FDB9FF16C3C41CEE7CCD8DAD099C66879732195F94BF6AC3BFDEFFBECCFFFDAF201C4A2A034DE03E0D48C1783F170935!840B110B5D768BBCAFC47E1A151E709AC93EA7D02FEFD7B1FC507B6CA9D38E073B5748E439D3BBB652CFB36344F7468E0D01F1817D7BA0209A0446DCC78A3B1025C4B68
7149!8401485F8997099CE185BCD36FA69B474B6136BE63184F94571104FD2B6CE8D310B44779EDE14EA43BABB275E84BBF4113C878B9DF2D60360B46EC0738396EAC37243130945!840D7BC44E8BDFEE5A974107084E47A67A1E0687D66B2379E995B353D765F41BD79B80ACCD697536D392A821B22B0A5F3048600267CB720330F1AE55EF9A403E56B3E157537!8406EB65460ABF46FD445E90CD4DF01D7CD2F02B7BB3ABC00E7AE39CF94322E6D81CF562B8C8855E6ACC5EEA57A8992CA315C8089B9556F98365529A57508DDBD544815073A!840492F22B359B1C2194DB19087736E14B37C12728A9DB7F53BBFD4AA3E5EE55D36492EE6E250946926D029BF1D9C267EDE7D9EE21CE3347BAD221910D7EA1DBA9B366A7940!8405CF0A28882526B8EE6F609434D551BFA71F6BB406FCD0B252880EF7F4AC9D9158A2F6E8D10634941557FD5EB3951EEA18E06664F8AA8C080C3B20B0925C774714B6B0834!840D70E7F6837F02D27ED8E396D2CE1524B5ED478B2A812F1A3F7E4B9A5E078BDFF935D574DB1A6821E277C116A3951F4A01DD73ACD8F2DEDFA16DD76173E21A39F3C687C4C!84008084EFEF1442AD8EB4888FDA019E82637A99D25A1E59450A6876E4F0D9BE782A1D091A4CBD8F56627727F044A512BFE3BE3CBB7538F0C48602B4204051D4A0B40140B3D!840EB
7398D97EE91F0DEC2386B9E7F9A8FBDBF8A9972EB6E5E33D2B0D00FFC19FC97C14480585402F0A227934A928D37374B774D7D324351D4DB16D2BD41668DB354D690B3B!840F09CA8A241BBE38AFB7E10F9D8E2D18D65071C26347BCAEA7505E0C16F5F3D9AA6B009C9BB58FE00A65E4F2F7013ECDDAD0053F3DA8D696FCE774C0EDA2D15E63264083E!8401D5362048ADEF157DC7CE38E02B0CC680EC79B8F4379D0A87A273F500A39B7909D99FE994090AB6BB74F0D6407F22F51777EE17F1E037B50FC847D721B53D24C451D0831!8406AE580CB3A1E056C2BA0C3A6B6F1B8DE4ABF43BADFFF89E3E2CD96B90AB397F021C4FCAA50B15A70632818568756A0C930A9C7C35CEDF4F1F9AA2982F2246AF449177C36!840A7317CA042FB4CF7963271DE489759C269DF067E45F4D9CE7D189A1BA6398444CE92659DE313030B2057E3AC8FCB5EF74595A378E917735D85CD2D28AE003B463E1F7D36!8403C0ECC30F40C9ED55FCA482FF0F16ACC7A58AF9C9FD378C85EF939258FC75AB0F64458CBBE50129E15BE859A90BCC492F87E0513510EA7B109CA09F308B9BB793D157D4D!840EF791CD9D532D21EEACBFD9E2EBCBE77F005E5D54E986ADD423366EC3EAA6F67414892C94C0650009326D462120C8D7D38759E1CD198D70CF576593C3FF052BF42187D40!840E6E90B3A1D97
C3202E3D6A065C55C16FF2F8ADC8231A5C4C529BE3174FDAD9C706A33957303F33C6597AB20EC32C5C7909F5C93933210B8630835B9223202CB94E1A7031!8405A47C9791D5118B4C3A71331538B855DF6AB50066C467602F8591B2E490F6C90F7ABDEC0B072CFCF4A4650318C3FDDD7E23280199FC87B2F44596FF382E9D40332647049!84042F582944360A1FAD79B881CE77F941D4E3DC975A76EF191C4CF6B09299AED9FA56B06B4ECA7BD6A85712054BEF78660E2436DA7E3246762B19DA8D5F95C23374A667139!527CC25016465748671468B7C326E84A776EC01CF562F7A0DE27FC5630C4ED73083984B0C706A7707B00B554408
FILENAME::= 
TYPE::= text/html
CHARSET::= iso-8859-15
REASON::= PROFANITY
SERVER::= TD-VIRT-EX-01
END::= 
REMOVED_BY_THE_EXCHANGE_EMAIL_SCANNING_SERVICE_008BC5E7_55E9F026D000000

A policy violated content was detected and removed from the original mail entity. You can safely save or delete this replacement attachment.
  </pre>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@openlayers.org">Users@openlayers.org</a>
<a class="moz-txt-link-freetext" href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a>
  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
Atle Frenvik Sveen
GIS Konsulent
Geomatikk IKT AS
tlf: 45 27 86 89
<a class="moz-txt-link-abbreviated" href="mailto:atle.frenvik.sveen@geomatikk.no">atle.frenvik.sveen@geomatikk.no</a></pre>
</body>
</html>