Hello,
The nodes are tagged with differents terms (categories).
Is it possible to display a different marker for each taxonomy term ?
Thank you for your help.

Comments

I have been looking at this too. All I have thought of so far is creating different overlays by using different Views with filters and then displaying them all on the map together. I have not tried that but it may work if you don't mind all the extra overlays?

With variable styling, you can have a different marker per Taxonomy. You just have to add a field to your Taxonomy that is the marker path, then you can bring that data into the Views Data Overaly and utilize variable styling.

Ah yes - fieldable entities if I am not mistaken! I am still getting to grips with those!

Thanks zzolo

Status:Active» Closed (works as designed)

All good? If you have more questions just re-open.

Hi,

First off great module! Many thanks to all the developers.
I'm strugling with different markers per taxonomy term.

What I did sofar is adding a field to my taxonomy markers, marker_url, where I put the path for the marker image I want to use.
Added the field (term) Taxonomy term: Marker URL in my OpenLayers Data Overlay

Is this correct? what is the next step?

Thanks in advance!

Status:Closed (works as designed)» Active

Status:Active» Fixed

I've added some documentation for this: https://drupal.org/node/1585880

If you want per taxonomy term it's probably going to be easiest to add the taxonomy term field; then use the replacement it gives you in ${term_node_tid_rendered} or ${term_node_tid} in your icon file name.

I'll close this solved as part of the cleanup of the issue queue for the openlayers sprint at Drupalcon Munich. If you need more do reopen. If you have more description to add to the documentation for the taxonomy term example, please do.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Is there a step missing from your instruction? Maybe Openlayers has been updated since the writing of the help text, but I need to select in the view OpenLayers Data Overlay -> Settings which field I want to use for the style of the marker. When I do this, I get a externalGraphic to the output of the view, but it doesn't seem to try to look anything from the path I have specified in the custom style of Openlayers, instead it's just looking at the root of the site: "'externalGraphic' => 'http://sitename.dev/Sales%20point',"

I've followed the instructions from #7, but when I look at the rendered map display. the filepath for the flag is coming up as icon-undefined.png. I'm not sure what I've missed!

I'm using OpenLayers 7.x-2.0-beta7. I have a taxonomy called "map category" with a text field I added that has the machine name "field-icon-name" for the name of the flag image file. In my "map category" taxonomy, I have several terms, and some of those terms have child taxonomies. One category, for example, is called Outdoors, and it has child terms of "Parks", "Rivers", etc. Rather than having one icon for all of the outdoor sites, my client would like to have different icons based on the child term. So I'm trying to show multiple flag icons on one OpenLayer map layer.

For the "Parks" child term, I have a flag icon named icon-outdoors-parks.png. I type "outdoors-parks" in my "Icon Name" text field. The file is in my sites/all/themes/bootstrap_base/plugins/openlayers/markers/ folder.

In my views, I have a data overlay called Outdoor Map that displays content with the parent "Outdoors" term. The preview includes the following parameters:

${field_map_category_rendered}
${field_map_category}
${field_icon_name_rendered}
${field_icon_name}

So then I have an OpenLayers style where I've set the externalGraphic URL to be sites/all/themes/bootstrap_base/plugins/openlayers_swva/markers/icon-${field_icon_name_rendered}.png, and I've set the Outdoor layer overlay to use this style on my map. But, when all is said and done, I have a broken image icon on my map, and firebug returns this path for the image icon: http://192.168.0.100/sites/all/themes/bootstrap_base/plugins/openlayers/...

I tried using all 4 tokens above in the externalGraphic URL with the same results. I can change my icon filename to icon-undefined and it shows up fine :P

please help!