Problem/Motivation

I would like to be able to provide layers from views based on views_geojson.

Proposed resolution

I've implemented the hook_openlayers_layers()and made layers from there.

That hook will get all views having those conditions based on 3 checks:

  1. Is the style_plugin of the display 'views_geojson' ?
  2. Is the display 'page' ?
  3. Is the path set ?

If all those conditions are met, a new layer is constructed programmatically.
You can use that feature on any maps made with Openlayers and enjoy :-)

Remaining tasks

You tell me.

User interface changes

No change.

API changes

No change.

Original report by Pol

Comments

pol’s picture

Patch for 7.x-1.x.

pol’s picture

Needs review.

zzolo’s picture

Hey. I would actually rather see this in the OpenLayers module. #1370448: Provide GeoJSON Layers from Views (integrating with views_geojson)

jeffschuler’s picture

Status: Needs review » Closed (won't fix)

That makes more sense to me, too.