It seems the preset for 'Temporary Style' only works when you have tooltips enabled. I think it'd be nice to have it work for any type of hover, with or without tooltips.

That, or create a separate vector style for hover...

Comments

phayes’s picture

Category: task » bug

This sounds like a bug.

zzolo’s picture

Category: bug » feature

I looked at this for a while. It's not really a bug, we are just not setting the hover to true for features:

OpenLayers example: http://openlayers.org/dev/examples/stylemap.html

Tooltips have the hover option, while popups do not. I have added this to popups, but I think this might be good to add to all vector feature styles. What do you think?

phayes’s picture

Category: feature » bug

I think your fix broke things.

Now if you hover you get a pop-up. Not good!

I think what we need to do is create a "NULL" hover behavior that activates the temporary style, but doesn't fire an event.

phayes’s picture

Title: Temporary style only works when using tooltips » A simple Behavior for activating temporary styles on hover
Category: bug » feature
zzolo’s picture

Title: A simple Behavior for activating temporary styles on hover » 2.x: Temporary styles for hover events
Version: 6.x-1.x-dev » 6.x-2.x-dev

I am going to move this to the 2.x feature request. If someone is interested in it, a patch is always welcome. But, we should keep things in scope and keep our momentum going.

zzolo’s picture

Component: OpenLayers Preset UI » OpenLayers API
Status: Active » Closed (won't fix)

Keeping this out of the queue. This seems like a fairly overly-complicated feature that that doesnt seem to be in high demand (though would be cool). If someone wants to work on this, please feel free to start a new ticket or re-opened this one. BWPanda, if you are still looking for this feature please feel free to reopen this one.

sano’s picture

Component: OpenLayers API » OL API

A real-world use case: a map shows ski trails. Each ski trail has some attributes, like length, elevation gain, etc... Users move cursor over a trail on the map and nothing happens (color of the trail line does not change for example), so they do not know the trails serve as triggers, therefore they never click on them to get the popup which has the info they are (likely) looking for - the trail length, buttons to edit the trail attributes, etc...

Now it would work as a workaround if it was possible to combine tooltips and popups on the same object, but it looks like that is not working either for drup 6.