The current implementation of the OL Views data style plugin has two problems:

  1. The style plugin can be used with any normal display types, though it is actually never meant to be used with a Views display. That means if you add it to a page or block display you will have a broken view on your hands -- not good.
  2. The style plugin is tied to a custom call to the pre_render() method in the OL map build process. Amongst other things, this means that the data layer cannot be cached using Views' built-in caching plugin.

This patch adds a Views display plugin for OL Views generated data layers and restricts use of the data views style plugin to this display type. The display type has none of the usual entry points (read: no paths, no blocks, etc.) so it cannot generate a broken View -- instead it only exposes OL Views data layers to OpenLayers for use in presets, etc. It also adjusts the rendering stack to go through the full Views build/execute/render process so OL data views can be cached.

Patches for 0.x, 2.x.

Comments

tmcw’s picture

tmcw’s picture

Status: Fixed » Active

That was a bit quick. I think this patch is broken for 2.x and needs a fix. Currently getting

Error: Display openlayers_1 refers to a plugin named 'openlayers', but that plugin doesn't exist!

tmcw’s picture

Status: Active » Fixed

Silly me, forgot to include the views plugin file.

tmcw’s picture

Status: Fixed » Needs work

Ugh, opening again. The views vector layer type needs rewriting in order to actually work with this.

Will White’s picture

Status: Needs work » Needs review
StatusFileSize
new923 bytes

This patch changes the openlayers_views_vector layer type to use render() instead of pre_render().

tmcw’s picture

Okay, completely patched

http://drupal.org/cvs?commit=324714

Thanks will & yhahn

Will White’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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