I have three content types with Getlocations Fields and try to get a map with views (type: Getlocations) showing all nodes as marker in the map with different marker colors with "Content Type Markers" activated in admin/config/services/getlocations. I get only blue markers, this is the "Default Content Map marker". What is the trick?

Thanks for help.

  • Look at this issue - seems exactly what you want, but I have no getlocations myself here to test it, so I'm not posting an answer. If it will help you, I hope you'll post a nice answer based on it yourself. If it does not, at least you'll be able to add some data to your question. – Mołot Jul 23 '13 at 13:45
  • I think this issue is the real one. – Stephan Jul 24 '13 at 14:48

There is a bug in getlocations.views.inc line 96 & 97:

if (isset($options['node_marker__' . $location['type'] . '__' . $location['field_name']])) {
              $marker = $options['node_marker__' . $location['type'] . '__' . $location['field_name']];

You need to strtolower $location['type'], then it works:

if (isset($options['node_marker__' . strtolower($location['type']) . '__' . $location['field_name']])) {
              $marker = $options['node_marker__' . strtolower($location['type']) . '__' . $location['field_name']];

1) Create a views. Inside this views create 3 different Overlay Layers (views display name is 'OpenLayers Data Overlay'), one for each content type. You should do this on the same view by overriding each display (recommended).

2) Add a new Openalyers map (admin/structure/openlayers/maps/add). In the Layers & Styles > Overlay Layers section add the 3 layers with the marker types you prefer.

3) On the views described on 1 create a page display with format "Openlayers Map" and select the Map you have created on step 2.

  • Thank you tplcom but we want to use Getlocations only. – Stephan Jul 24 '13 at 14:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.