Is there a way to fiter and update an openlayers map in a block via ajax using an exposed views filter? I've set up my map and created an exposed filter, and when I submit the filter form I can see in Firebug that the map's wrapper element's html is getting updated, however the map doesn't seem to reinitialize/update with the filtered data.

(I know that the filter is set up properly on the views side, because if I go to the/node/path?nid=4, say, I get the map as expected.)

Can someone point me in the right direction for how to pull this off? I assume that there is a javascript function (or two) I need to call to reinit the map properly...


tmcw’s picture

Currently, this is not possible, given the way that Drupal handles views and javascript additions to the page. Work related to this issues is happening in #889190: Implement GeoJSON output as a standard.

jasonn1234’s picture

Status: Active » Closed (works as designed)

Thank you!

light9’s picture


dgastudio’s picture


Anonymous’s picture

Component: OpenLayers Views » OL API


I subscribe to that post too. I would like to know how to update an openlayers map with points filtered from an ajax exposed filter.


acbramley’s picture

@michee.advances this used to work in beta1 version of openlayers, I have an issue open #1993172: AJAX responses for views exposed filters broken (worked in beta3) where I'm trying to figure out what's causing it to no longer work. This issue has been closed for a long time, maybe join the discussion over on my issue