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.
I'm starting to think that this is best implemented as a different control than popup. The implementation of popups in OpenLayers is lackluster and poorly designed for this usage.
steinmb: in the meantime, you can just use the openlayers_plus module, that's what many big users are doing.
I'm not sure about what the gameplan should be here. My potential idea is to rewrite the parts of the openlayers_plus behavior into Drupal-independent and jQuery-independent code and pitch them as an addition to OpenLayers proper. The main problem is that it's unsightly and wrong to maintain great amounts of unabstracted javascript code in this module.
Though I agree with trying to minimize JS in this module, I think:
* Trying to get an adequate tooltip in upstream would take some significant time and effort (assumingly)
* The current solution is really no good (we should at the very least remove it; maybe see if someone wants to put this in an outside module or just point to openlayers_plus)
* This seems like a valid case for creating our own basic solution, as it is a desired, general-enough feature, without an adequate solution in OL
@tmcw: Thanx! :) I did not know that this module existed, perhaps create a link at the project page linking to this project at Github?
I agree that that maintaing a great amount of js code is not the way forward. Perhaps do go the same way that the WYSIWYG module and other have. A wrapper module with the minimum settings req. like user feedback that the js code was found and what version and perhaps dependency warnings if the user switch to a unsupported version. The js code is kept outside the module in site/all/library/[something].
I know this adds another step to get everything up and running but then again OL not a turnkey solution anyway.
Is "hover from point to popup box" a popular requirement?
I'd rather not have it - it seems more confusing. eg on a map with many markers, there's often a marker between the current marker and the content of the popup. What happens if a user moves their cursor from first marker over the intermediate marker? Should we show the new hover (what I'd expect), or ignore it in case the user is moving to the popup?
It's at least a commonly-requested option: if points are only hoverable (not clickable) and contain groups of items, there is no other way to navigate to individual items from a map.
Er, between popups and tooltips, similar thing. Anyway, the point of this ticket is to import the openlayers_plus implementation of tooltips into this module. Or to make the openlayers_plus impl immediately usable for others.
Closing - we've agreed elsewhere that, despite the low quality of many OpenLayers components, the task of improving upon them is for other modules, not this one.
Comments
Comment #1
tmcw CreditAttribution: tmcw commentedComment #2
tmcw CreditAttribution: tmcw commentedI'm starting to think that this is best implemented as a different control than popup. The implementation of popups in OpenLayers is lackluster and poorly designed for this usage.
Comment #3
zzolo CreditAttribution: zzolo commentedThough not the best code in the world, I do enjoy the tooltip that is in 1.x.
Comment #4
toomanypets CreditAttribution: toomanypets commentedSubscribe.
Comment #5
zzolo CreditAttribution: zzolo commentedHey @tmcw, what about aiming to base the tooltips from the tooltips that are implemented in openlayers_plus?
http://github.com/developmentseed/openlayers_plus
Comment #6
steinmb CreditAttribution: steinmb commentedOne more annoying subscribe :)
What can we do to help getting this 4 months old critical issue fixed? Thanx for a great module by the way.
Comment #7
tmcw CreditAttribution: tmcw commentedsteinmb: in the meantime, you can just use the openlayers_plus module, that's what many big users are doing.
I'm not sure about what the gameplan should be here. My potential idea is to rewrite the parts of the openlayers_plus behavior into Drupal-independent and jQuery-independent code and pitch them as an addition to OpenLayers proper. The main problem is that it's unsightly and wrong to maintain great amounts of unabstracted javascript code in this module.
Comment #8
zzolo CreditAttribution: zzolo commentedThough I agree with trying to minimize JS in this module, I think:
* Trying to get an adequate tooltip in upstream would take some significant time and effort (assumingly)
* The current solution is really no good (we should at the very least remove it; maybe see if someone wants to put this in an outside module or just point to openlayers_plus)
* This seems like a valid case for creating our own basic solution, as it is a desired, general-enough feature, without an adequate solution in OL
Comment #9
steinmb CreditAttribution: steinmb commented@tmcw: Thanx! :) I did not know that this module existed, perhaps create a link at the project page linking to this project at Github?
I agree that that maintaing a great amount of js code is not the way forward. Perhaps do go the same way that the WYSIWYG module and other have. A wrapper module with the minimum settings req. like user feedback that the js code was found and what version and perhaps dependency warnings if the user switch to a unsupported version. The js code is kept outside the module in site/all/library/[something].
I know this adds another step to get everything up and running but then again OL not a turnkey solution anyway.
Comment #10
davidhk CreditAttribution: davidhk commentedIs "hover from point to popup box" a popular requirement?
I'd rather not have it - it seems more confusing. eg on a map with many markers, there's often a marker between the current marker and the content of the popup. What happens if a user moves their cursor from first marker over the intermediate marker? Should we show the new hover (what I'd expect), or ignore it in case the user is moving to the popup?
Comment #11
tmcw CreditAttribution: tmcw commentedIt's at least a commonly-requested option: if points are only hoverable (not clickable) and contain groups of items, there is no other way to navigate to individual items from a map.
Comment #12
tmcw CreditAttribution: tmcw commentedComment #13
zzolo CreditAttribution: zzolo commentedHey @tmcw, what is "new Popups implementation" in this case? The original issue was concerning tooltips.
Comment #14
tmcw CreditAttribution: tmcw commentedEr, between popups and tooltips, similar thing. Anyway, the point of this ticket is to import the openlayers_plus implementation of tooltips into this module. Or to make the openlayers_plus impl immediately usable for others.
Comment #15
tmcw CreditAttribution: tmcw commentedClosing - we've agreed elsewhere that, despite the low quality of many OpenLayers components, the task of improving upon them is for other modules, not this one.