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.
In the popup & tooltip behaviour, the layers parameter that is passed to the creator of the SelectFeature Control passes an Array, even if there is only 1 layer in that Array.
This patch passes the layers variable as a Layer when there is only 1 layer.
We ran into issues with this using our openlayers_geosearch vector layer + another vector layer with a popup/tooltip behaviour.
With this patch, both layers can have their own SelectFeature Control.
Comment | File | Size | Author |
---|---|---|---|
#1 | SelectFeatureperlayer-1393460.patch | 1.2 KB | batje |
Comments
Comment #1
batje CreditAttribution: batje commentedLike this title better. Patch attached.
Comment #2
zzolo CreditAttribution: zzolo commentedHey @batje. Thanks for the patch, but I am not sure what problem this solves. The SelectFeature control can handle an array or a single layer. What specific issues were you having? Also, is this true of 7.x too?
http://dev.openlayers.org/docs/files/OpenLayers/Control/SelectFeature-js...
Comment #3
zzolo CreditAttribution: zzolo commentedHey @batje. I think you meant for this comment to be here:
Comment #4
zzolo CreditAttribution: zzolo commentedThis has been committed to D6 and D7. Thanks for the patch!