I am building an events page. The page is using Gmap, Locations and Views modules.

In the content type "Events", I have set a checkbox for "Featured Event", I want these events to stand out in the map, so I would like to use a different marker in the map if the event is a "Featured Event".

Please let me know how to do this. Thanks in advance

1 Answer 1


I would use CSS for this.

  • Add your featured checkbox field
  • Add a views-row class, in the format settings, with the replacement pattern of the value for the checkbox

Now I can't remember if GMap will add that class to the marker rows too. If it does not, I would advise you to override the template for the view and in the class section, add $fields['field_featured'], making sure that there is a space before it

  • Using that class, you can style it however you want using CSS and/or JS

Hope that helps!

  • 1
    Sounds like a great idea, thanks for the post. I will try this and get back to you.
    – lambda8
    Jan 30, 2017 at 21:39
  • There is no way to add a class to gmap marker row, could you help please? this is the html that I am seeing: <div style="width: 20px; height: 34px; overflow: hidden; position: absolute; opacity: 0.01; cursor: pointer; left: 1080px; top: 375px; z-index: 392;" class="gmnoprint" title=""><img style="position: absolute; left: 0px; top: 0px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px; max-width: none; width: 20px; height: 34px;" src="/sites/all/modules/gmap/markers/event.png" draggable="false"></div>
    – lambda8
    Jan 31, 2017 at 20:12
  • I fixed this issue with the help of the "GMap Taxonomy Markers" module. Thanks for your time.
    – lambda8
    Jan 31, 2017 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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