Is there a way to enable an exposed filter on a map Page display to control the content in the same map's Block display?

I'm using Drupal 7.18 and OpenLayers 7.x-2.0-beta3. I have applied the patch and revision in http://drupal.org/node/1876702 ("Popup only works once"), notes #2 and #4.

I have two Views, one for the OpenLayers Data Overlay and one with two Displays: Page (Format: OpenLayers Map) and Block (Format: HTML list). The Page display shows the map with markers in the content region and the Block display shows a list of the place names of each map marker in the sidebar region. Each place name links to an external web site.

Both Views and Displays include an exposed filter that enables the user to display the map markers or the list of place names by state. The filter uses the Address Field to get the state for each place. The View uses AJAX to update what is shown to the user.

At the moment, these two filters work independently of each other. A user can display the map markers or the list of place names by using each display's filter. This can be confusing for the user when the map markers change and the list doesn't.

I'm looking for a way to enable the filter to control both Displays, so when a user chooses to display the map markers for a particular state, the list of place names in the sidebar will update to display the names from that state at the same time.

I haven't found a way to do this and would appreciate any suggestions as to how to make this work. Thanks.

Comments

Jimmel’s picture

I would like to do exactly the same thing. I have tried a number of different combinations but nothing seems to work. One filter for all the the display types.

Jimmel’s picture

Maybe this will help as a starting point
http://drupal.org/node/1547774

Jimmel’s picture

Ok seems like it might have something to do with 'Inherit exposed filters'. Which is in the attachment display.

Jimmel’s picture

1: add an attachment in views
2: Makk'e that attachment a list or whatever you want it to show up as.
2: Link that attachment to the page
3: That's it, the filter will filter the openlayers map and give you a list of details about those filter locations.

Jimmel’s picture

Link a block to the attachment and then you can place it in a region. Use Display: hidden css to get rid of the map.

ifrik’s picture

Status: Active » Postponed (maintainer needs more info)

Thanks Jimmel,

this is in fact more a Views question than OpenLayers, and using an attachment should be the way to do this.

Camhoward, does this work for you?