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 have been unable to get pop-up behaviors working on features in touch screens - both Android and IPad/Pod although they were OK before updating OL library to 2.11
I have tried various settings in the behavior UI but nothing works so far. Would appreciate any advice on this.
Thanks
Comments
Comment #1
Patroclas CreditAttribution: Patroclas commentedDoes this work at all - or is it my installation? Would be interested to hear from anyone that has pop-ups working on touch screens.
Comment #2
zzolo CreditAttribution: zzolo commentedI believe this is a duplicate. But I did some initial testing and saw the same behavior. Unsure if it this module and its popup behavior (likely) or an upstream issue.
Comment #3
Patroclas CreditAttribution: Patroclas commentedThanks zzolo - at least I know it is probably not my settings. Would be useful to get this fixed. Anyone else have any suggestions to help out here? Unfortunately I am not a coder so can't help further.
Comment #4
guictx CreditAttribution: guictx commentedI'm having this same issue with touch devices (iPhone, iPad and Android). I thought I had solved the problem I first mentioned here - http://drupal.org/node/1370822 - but no.
My findings:
1. If I disable the Navigation behavior popups work;
2. On my dev machine which uses Nginx instead of Apache popups work - that's why I thought the issue was solved;
3. The popup examples with vector layers on the OL website (eg: http://openlayers.org/dev/examples/dynamic-text-layer.html) work.
Could this be a problem with the navigation behavior?
Comment #5
guictx CreditAttribution: guictx commentedComment #6
JonMcL CreditAttribution: JonMcL commentedI recently posted this issue:
#1470864: Custom behavior not responding to touch events
There is a quick module I threw together in there that, I think, demonstrates the issue. The module is entirely based off of the standard Feature Popup behavior that ships with OL. So I would think that it *should* work if the standard popup behavior works.
Comment #7
guictx CreditAttribution: guictx commentedI have a new lead!
After diffing the map page served from my nginx machine against apache I discovered that, for some reason, in the page served by Apache openlayers_behavior_popup.js comes before openlayers_behavior_navigation.js in the head section, as oposed to nginx that changes this order.
This is the openlayers_behavior_*.js order in my Nginx machine:
And this what I'm getting with Apache:
So I went and changed openlayers_behavior_popup.inc to add weight to the openlayers_behavior_popup.js to make sure it comes in last place.
As a result my popups now work in touch devices!
Comment #8
Patroclas CreditAttribution: Patroclas commentedCould you explain how you actually did that please?
Comment #9
guictx CreditAttribution: guictx commentedSure, just bear in mind that this is a dirty hack to test and try to identify the bug, not a real solution to the problem.
In /sites/all/modules/openlayers/plugins/behaviors/openlayers_behavior_popup.inc, I changed the last render function to:
Comment #10
Patroclas CreditAttribution: Patroclas commentedThanks - will test that
Comment #11
zzolo CreditAttribution: zzolo commentedSo, given certain things, I think this may be caused because of whatever reasons, the Navigation Control is being added after the popup behavior. The Navigation control adds a fair amount of mobile related things. Unfortunately I don't have much technical reason as to why this is, but I think managing some weights is probably the best bet here.
Comment #12
zzolo CreditAttribution: zzolo commentedI have updated this and tested in iOS simulator and it is working for me. Thanks.
Comment #14
aasarava CreditAttribution: aasarava commentedZzolo, is this fix in the dev version?
Comment #15
loren H CreditAttribution: loren H commentedI had to also add a weight = 0 to the navigation.inc in addition to popup weight=1 to get it to work. Not sure if that's just common knowledge but thought I'd share if anyone was having troubles.
Comment #16
Nitebreedseems to fix it!
Comment #17
cedric_aTo fix this in Drupal 6, I use the 'type' argument to sort the js calls as explained in the API documentation
So add
, 'theme'
to drupal_add_js() call in openlayers_behavior_popup.inc (or any custom behaviours having this issue) like this :Comment #18
sano CreditAttribution: sano commentedthanks WeBla. :-)