Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
thanks for this fantastic module! I'm using OpenLayers to display a map with nodes (represented as circles) with tooltips .. Is there a way to link those circles to the node? Or to add additional information to the tooltip (e.g. cck-fields)
Thanks :)
Comments
Comment #1
zzolo CreditAttribution: zzolo commentedThanks! Well, you should be able to add a title and description to your tooltips. These fields can be links to the node as this is managed in Views fields, not in OpenLayers.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedThanks :)
But then I have the problem, that the tooltip disappears whenever I try to reach it with the mouse :(
-- okay .. disable tooltip and only enable "clickable box" .. then it works. Perfect,thanks :)
Comment #3
zzolo CreditAttribution: zzolo commentedFor the tooltip moves away too quickly, see #733542: tooltips appear and disappear too quickly in IE
Also, could you confirm (in the other ticket), that you see this behavior in the 2.x version as well (as so far it has only been seen in the 1.x version).
Comment #5
milesw CreditAttribution: milesw commentedNow that a couple months have passed, is this kind of linking possible? I'm hoping to do the same thing as the OP here - link point features (correct terminology?) to nodes. But I still want to use the tooltip to display other content. It seems many OpenLayers maps are doing this exact thing, including afghanistanelectiondata.org and many of DevelopmentSeed's beautiful maps.
I'm still very new at all this. Would this functionality require a custom behavior or am I missing something obvious?
Comment #6
tmcw CreditAttribution: tmcw commentedmilesw: if you're looking for functionality like that in afghanistanelectiondata, check out the OpenLayers Plus module, that contains a tooltip and popup replacement, the tooltip of which provides on-click linking to nodes.
Comment #7
milesw CreditAttribution: milesw commentedTom:
Actually I've been playing around with OpenLayers Plus already. Your tooltips and popups are awesome -- very close to the result I'm looking for. And messing with OL+ has also helped me understand how behaviors can be implemented, so thanks for sharing the package :)
Unless I'm missing something, I don't see a behavior that turns the actual point into a link. Obviously it's possible though. Does it require writing a new behavior?
Comment #8
tmcw CreditAttribution: tmcw commentedThe OpenLayers Plus Tooltips behavior actually turns points into links - when you click on them, it'll bring you to the linked node - you can see the logic here - http://haitiaidmap.org/profiles/quest/modules/custom/openlayers_plus/beh...
Comment #9
milesw CreditAttribution: milesw commentedYup, it does exactly as you say it does. My problem was that I was grouping nodes - don't know how I expected that to work.
And thanks for pointing out the JS logic. I saw that it looks for the very first anchor tag, so I was able to get links to taxonomy pages working also.
Comment #10
tmcw CreditAttribution: tmcw commentedMarking this as by design.