I am trying to implement the folowing functionality and I am wondering whether it is possible with Geofield + OpenLayers + Views. I need to have:

1) One view that displays content on an OpenLayers map. Each node on the map has a geofield.
2) Another view next to the first one that shows the same content but (let's) say in a table
3) Have the two views synchronized: when I zoom the map in or out (so that less or more nodes become visble), I would like the second view to dynamically follow and always display only the nodes visible on the first view.

I know how to build (1) and (2) but have no idea how to do 3. Basically I need an OpenLayers map to act like an interactive filter for my second view. Is this possible?

Thanks for the help!

Comments

kirilius’s picture

Hi, any ideas?

dasjo’s picture

hi kirilius,

how do you approach 2), as geofield doesn't have #1488274: Views Support for Bounding Box?

i guess for 3) you would want to build some custom code upon the openlayers bbox strategy in order to update the second view. which means passing the bbox params like an exposed filter.

i'm not an expert, but i think you would want to create a custom strategy and subscribe to the "moveend" event. see http://trac.osgeo.org/openlayers/browser/trunk/openlayers/lib/OpenLayers...

then get the bbox values and see if you can do something like Autosubmit for exposed filters with JQuery.

as a side note, i have created a bbox strategy for leaflet similarly in the leaflet_geojson module.

such functionality might be helpful for others if built in a re-usable way.

kirilius’s picture

Thank you dasjo,

In (2) I meant just a plain view without any filters. I don't quite know what bounding box means but I guess it is the key to my request ;-)

kirilius’s picture

Issue summary: View changes

Fixed a typo