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.

CommentFileSizeAuthor
#1 openlayers_760560.patch914 bytesWill White
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Will White’s picture

Status: Active » Needs review
FileSize
914 bytes

This patch fixes the issue by manually setting the layer title from the view title.

zzolo’s picture

Your 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?

tmcw’s picture

@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.

zzolo’s picture

Ah, I see. So, OpenLayers is not actually caching the data, just the display and title. Sorry about that. Thanks.

tmcw’s picture

Status: Needs review » Fixed

Committed: http://drupal.org/cvs?commit=350424

Thanks for the patch!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.