Hello Sajeer,
When I try to use {hover: true} in the SelectFeature definition, the
popups appear and dissapear when I hover the mouse over a marker. If I
use hover:false, I get the regular functionality - the popups
appear/dissapear when I click on them.
This is great... problem is - I would
Ok, then replace
selectControl = *new* OpenLayers.Control.SelectFeature(kmlLayer,
{hover: *true*,onSelect: onFeatureSelect, onUnselect: onFeatureUnselect});
with
selectControl = *new* OpenLayers.Control.SelectFeature(kmlLayer,
{ clickout: true, hover: false });
and add this too
kmlLayer.ev
Thank you Sajeer,
To make it clear for me: you would register the "featureselected" event
for mouse over? Where do you specify hover:true/hover:false?
I'd like to be able to keep featureselected for when the user actually
clicks on the feature - so I'd like to register 2 events to generate 2
d
you can register this function for click event by replacing hover:true with
hover:false* *
Regards
Sajeer
On Thu, Jul 16, 2009 at 3:38 PM, Adrian Popa
wrote:
> Hello Sajeer,
>
> How do you register your functions to events so that they are executed on
> mouse over instead of on click?
Hello Sajeer,
How do you register your functions to events so that they are executed
on mouse over instead of on click? Or is your popup created when you
click a feature?
Thanks,
Adrian
Sajeer... wrote:
*
Hi,
try this one,
function
* onFeatureSelect(feature) {
selectedFeature =
*
Hi,
try this one,
function
* onFeatureSelect(feature) {
selectedFeature = feature;
popup =
*new*
OpenLayers.Popup.FramedCloud("",
feature.geometry.getBounds().getCenterLonLat(),
*new* OpenLayers.Size(100,100),
""+
""+
""+
"Name"+
":"+
""+feature.attributes.label+""+
""+
"",
*
Hello Pavel,
Great idea... However - I would like to keep popups for when I click on
an item.
Would it be possible to do something like:
layer.events.on({ "featureselected": onLocationSelect,
"featureunselected": onLocationUnselect, //open regular popups
"onM
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