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.
The Block switcher always defaults to the same base layer selection on the radio buttons and on the map every time the page is refreshed. This happens regardless of previous selections made, it would be nice if the old state is remembered and restored even after page reloads.
Comment | File | Size | Author |
---|---|---|---|
#1 | openlayers_plus_behavior_Fixed-blockswitcher-reload-2039917-2.patch | 19.4 KB | davidserene |
Comments
Comment #1
davidserene CreditAttribution: davidserene commentedThis patch adds two functions to the block switcher behavior; one function sets a cookie saving the current state of the map layers while the second function restores the old state on subsequent page reloads.
Comment #2
batje CreditAttribution: batje commentedworks, thanks!
Comment #4
designguru CreditAttribution: designguru commentedCould this code be used in any way to save the currently visible/active layers when saving a node with a geofield?
Ref: https://drupal.org/node/2096497#comment-7894635
(I'm trying to use a single map for multiple nodes where the nodes themselves turn on whatever overlays they need to be active when a user views them.)
q./