I'm trying to set my Openlayers markers to custom icons. I have looked at the Openlayers Examples, and I have added a new style of type Icon and then I have added an assets folder inside the Openlayers module directory. I then have set the path to the marker in the style settings tab.

The problem is that no matter how I configure the path, the marker doesn't show up in the style preview or on my map. I have tried the full site path for the marker, I have tried the path from the drupal root, and I have tried the path from the Openlayers module folder. None of these work.

As always, any advice is appreciated.

2 Answers 2


To "set custom markers" (as in your question title), you may also want to look at the IP Geolocation Views & Maps module. Partial quote from its project page (especially note the last paragraph of it):

Despite what the name may suggest, IP Geolocation Views & Maps (IPGV&M) is first and foremost a mapping engine.

The module makes it very easy to create Views-based mapping solutions using the map renderer of your choice (Google, OpenLayers or Leaflet) with any location storage module of your choice, e.g.:

This allows you to bring together modules and feature sets that without IPGV&M you would not be able to combine.

Like beautiful animated marker clustering on Google or Bing or Mapbox ... any of various map providers.

But more importantly IPGV&M adds some features you won't find as conveniently packaged elsewhere.

These include marker differentiation based on field values or ranges (2nd screenshot) with or without font icons, various centering options, super-imposing the current visitor's location, allowing multiple content types to be displayed on the same map, full screen button and mini-map inset (bottom screenshot), polygon support (Geofield), marker tags and tool tips and cross-highlighting of associated content on the page when markers are hovered (and vice versa).

Head over to its (impressive) project page for even more information about it (it would be way too long to include a quote of it all here). That project page also includes various screenshots.

  • ok, merci (thank you)! I'd be interested in your feedback about it after you looked at it. Also (not sure if I should have added that to my answer): I think it's never a good idea to use a DEV version of a module if it is for a prod site (so if my suggestion "also" works for you, I'd recommend to no longer use that DEV version) Feb 4, 2016 at 8:16
  • Hi Pierre, the marker functionality and popup simply does not work on my dev or test systems with the OL - 7.x-3.1. I've posted in the OL issue queues about this and I haven't really gotten an answer to why they only work with the dev version for me. Part of why I am using OL is because I haven't found an easy solution to be able to show node and user entities in the same map (at least not with Gmap).
    – nizz0k
    Feb 4, 2016 at 8:38

So, I updated OL to the dev version and the behavior went away.

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.