<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello Pavel,<br>
<br>
Great idea... However - I would like to keep popups for when I click on
an item. <br>
Would it be possible to do something like:<br>
<br>
layer.events.on({ "featureselected": onLocationSelect,
"featureunselected": onLocationUnselect,  //open regular popups<br>
                                  "onMouseOver": onLocationMouseOver,
"onMouseOut": onLocationMouseOut<br>
 });?<br>
<br>
Problem is - I don't see those kinds of events on my layer. These are
the event types for a vector layer:<br>
<span class="objectBox objectBox-string">0 "beforefeatureadded"</span>
<div class="memberLabel ordinalLabel">1 "beforefeaturesadded"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">2 "featureadded"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">3 "featuresadded"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">4 "beforefeatureremoved"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">5 "featureremoved"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">6 "featuresremoved"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">7 "beforefeatureselected"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">8 "featureselected"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">9 "featureunselected"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">10 "beforefeaturemodified"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">11 "featuremodified"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">12 "afterfeaturemodified"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">13 "vertexmodified"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">14 "sketchstarted"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">15 "sketchmodified"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">16 "sketchcomplete"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">17 "refresh"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">18 "loadstart"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">19 "loadend"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">20 "loadcancel"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">21 "visibilitychanged"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">22 "move"</div>
<span class="objectBox objectBox-string"></span>
<div class="memberLabel ordinalLabel">23 <span
 class="objectBox objectBox-string">"moveend"</span><br>
</div>
<br>
Any idea what the events would be? If they are supported?<br>
<br>
Pavel Iacovlev wrote:
<blockquote
 cite="mid:2a37f67a0907160444q5549db2eh7ecbf47281c76fba@mail.gmail.com"
 type="cite">
  <pre wrap="">There many possible ways around this problem.

One is rewrite/extend your popup code. Popup is triggered on mouseover
and on mouseout popup is hidden. You can style the popup so it looks
more like a tooltip/label.

On Thu, Jul 16, 2009 at 2:34 PM, Adrian
Popa<a class="moz-txt-link-rfc2396E" href="mailto:adrian_gh.popa@romtelecom.ro">&lt;adrian_gh.popa@romtelecom.ro&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi,

Just a quick question - my users want to see the name of the city when
they are hovering over points loaded through KML in a vector layer. I
know this isn't supported, but are there plans to support such labels?

I'm thinking a different strategy might be to override/inherit the
OpenLayers.Control.MousePosition class and based on coordinate changes,
load the name from the closest KML feature. It doesn't need to be too
accurate, but it can't be an exact match, because the mouse will never
get that close to the KML coordinates.
However this solution will be costly - because on every mouse move you
would have to go through all the KML items and see which match...

What are your ideas regarding this subject?

---

Adrian Popa
NOC Division
Network Engineer
Divizia Centrul National de Operare Retea
Departament Transport IP &amp; Metro
Compartiment IP Core &amp; Backbone
Phone: +40 21 400 3099

_______________________________________________
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>
  <pre wrap=""><!---->


  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
--- 
Adrian Popa
NOC Division
Network Engineer
Divizia Centrul National de Operare Retea
Departament Transport IP &amp; Metro
Compartiment IP Core &amp; Backbone
Phone: +40 21 400 3099
</pre>
</body>
</html>