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.
Layer titles from views vector layers cannot be dynamic because they are stored in the layers cache. This prevents layers from having dynamic layer titles based on view arguments, for example.
Comment | File | Size | Author |
---|---|---|---|
#1 | openlayers_760560.patch | 914 bytes | Will White |
Comments
Comment #1
Will White CreditAttribution: Will White commentedThis patch fixes the issue by manually setting the layer title from the view title.
Comment #2
zzolo CreditAttribution: zzolo commentedYour patch looks straightforward and good (though I have not tested this).
But I am a little confused on a few things here. Sorry for my ignorance, but this seems like a larger problem.
Won't this situation also affect arguments in general? Also, is this a Views problem, not an OpenLayers problem, if not then what are we doing wrong in general? What is the difference between the caching we set for the display plugin and the option in the interface to set cache?
Comment #3
tmcw CreditAttribution: tmcw commented@zzolo: This isn't a view problem, OpenLayers implements another layer of caching on top of what Views does because loading all views and filtering them to find OpenLayers views is an expensive operation, especially when there are lots of views. This isn't something that views is built for.
Comment #4
zzolo CreditAttribution: zzolo commentedAh, I see. So, OpenLayers is not actually caching the data, just the display and title. Sorry about that. Thanks.
Comment #5
tmcw CreditAttribution: tmcw commentedCommitted: http://drupal.org/cvs?commit=350424
Thanks for the patch!