Hello,

I've build a map with several layers (views), one for each content type (i.e City, Village, Castle, Church..), with different markers.

In the map they are shown all together but I'd like the user can choose which layer disable.

Is this possible, with exposed filters or something else?

I'd like a result like this:http://www.tripadvisor.it/LocalMaps-g187895-d1461957-Golden_Tower_Hotel-...

Comments

ppatterson-edc’s picture

StatusFileSize
new92.59 KB
new93.69 KB
new92.44 KB

I would like to know how to make this happen as well. Currently, I have exposed filters working on my map. I have all my plotted points geocoding properly, but as soon as you select an option (in my case, I'm filtering on a taxonomy term), OpenLayers uses a default marker.

For example, here's my legend:

Red Marker = campus
Green Marker = state
Blue Marker = tribal

By default, a map appears with a mix of all three layers/markers displaying across the state. However, as soon as I attempt to filter the results, all markers display as blue, which is confusing to the end user, who is greeted with the color-coded legend above to start.

Essentially, I'd like to filter on the OpenLayers Data display. Is that possible? I've attached three images to illustrate. The first is the default map; the second and third are the filtered maps.

chefarov’s picture

Similar problem here except that when I add multiple(actually 2) styles in my preset(so that I can also have different markups on the map), the exposed filter doesn't work at all... The url is updating but all the markers still show up.

Everything works fine if I keep one style per preset which means:
One map with one markup for every node uppon it, and nodes filtering using an exposed filter on taxonomy term id.
However even on that case(one style on preset) if I choose exposed filter on content type instead of taxonomy term I get the same misbehavior, something that make me think that the problem is more complexed.

figs’s picture

I'm also curious in getting this working. At the moment I can display multiple styles via multiple layers, but implementing the exposed filter results in strange results.

Originally I had the exposed filter in the map view and a single data view. This worked fine. Adding multiple data views to the map view via multiple layers in the preset works, except the exposed filter doesnt seem to want to talk to multiple data views.

figs’s picture

I got this working, albeit a tad clunky.

I'm filtering content on my map via taxonomy terms; all content is of a single node type. Each of my preset layers has its own style, each with its own marker. Each preset layer is associated with a data view. Each view has an exposed filter of type 'Taxonomy Term ID', with the exposed filters matching exactly that of the display map view's exposed filter. Each data view ALSO had a secondary filter that was NOT exposed. This filter was on 'Taxonomy Term Name' (creating a second filter on 'Taxonomy Term ID' didn't work). I manually entered the term names in this filter. This second filter acted as a cross filter so that each layer only displayed content of the correct type, and each layer responded to the master exposed filter on the map view.

I also noticed that the built in map layer switcher effectively does the same job as this.

chefarov’s picture

Hi figs.
Thank you for your respond and the info.

It would be helpful if you could explain me a bit about:
a)By "master exposed filter" you mean that we keep an OpenLayers Data Display as parent display in our view, and we make more displays for each term/marker/style with the same exposed filter?
b)When you say that built in map layer switcher does the same job, you mean rather than adding a secondary filter at all. Or the whole process somehow?

I have reproduced your steps and I have come up with a strange behavior (I get duplicate images on nodes and when filtering, images are changing and so), that's why I ask.

Thanks again

chris_h’s picture

Did anyone find a solution to this? By setting the page to have a blank exposed filter, and each of my data overlays to have an exposed filter to the same taxonomy term they had, I had the same problem as @ppatterson-edc (albeit in 7.x-2.x-dev), where any taxonomy reference in the url - even 'all' - would make all markers the same colour. I managed to solve the immediate although not underlying issue by using a field type of list (text) with exposed filters, rather than taxonomy terms, which may be useful to know.

zzolo’s picture

Title: Enable/Disable Layer with an exposed filter » Enable/Disable Layer with a query string
Version: 6.x-2.x-dev » 7.x-3.x-dev
Category: support » feature
Priority: Normal » Minor

Hey all. This is an interesting feature. There is no support in the module for this at the moment.

But as we are moving away from Views for display in 3.x, this should just be a general query string filter.