<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello everyone,<br>
<br>
This is sort of a repeat message of "Re: [OpenLayers-Users]
Labels/Tooltips on mouse over a Vector layer" - but with a slightly
different idea.<br>
<br>
Problem: I want to display a small div/popup with the marker's name
when the user hovers his mouse over the location, and I want to display
a bigger popup when the user actually clicks on the location.<br>
<br>
Current status:<br>
* I can use {hover: true} to register featureselected/featureunselected
when I hover over a marker instead on when I click on the maker.<br>
* I haven't found any events that could differentiate between hover and
click<br>
<br>
I'm thinking I could register my select control with hover: true and
allow featureselected to execute the same function for both when I
click on the makrer as well as when I hover over the marker. I would 
like to know if there's any way to find out in the event inside the
function if the user clicked or not his mouse. Depending on this, I
would show one popup or the other.<br>
<br>
Something like:<br>
<br>
select = new OpenLayers.Control.SelectFeature(markers, {clickout:true,
hover:true});<br>
        markers.events.on({ "featureselected": onMarkerSelect,
"featureunselected": onMarkerUnselect, "visibilitychanged":
onMarkerToggle });<br>
       
map.addControl(select);<br>
        select.activate();<br>
<br>
function onMarkerSelect(event){<br>
    var feature = event.feature;<br>
    //find out if the user clicked or not<br>
    var clicked = event.<b>findAWayToSeeIfTheUserClicked()</b>;<br>
    if(clicked){<br>
       //show larger popup<br>
    }<br>
    else{<br>
       //show smaller popup<br>
    }<br>
}<br>
<br>
Suggestions are welcome.<br>
<br>
Thanks,<br>
Adrian<br>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>