Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi guys, so I downloaded openlayers.js ver 2.11 from the website and put it in sites/all/libraries/OpenLayers/OpenLayers.js but when I opened up the map on my website, all the icons disappeared .. any idea what went wrong?
Comments
Comment #1
Patroclas CreditAttribution: Patroclas commentedYou may need to change the image location in your maps - and check that you have the image files in your OL. Also check that any css is pointing to the correct location. Using Firebug you should be able to see where the images should be and check where they are.
When I changed to a local OL library, it was difficult to know which files were essential - I have never found any good information on this.
Comment #2
zzolo CreditAttribution: zzolo commentedThe library that is OpenLayers is more than just the JS file, it includes the images and CSS that come in the zip file. You should put the whole zip contents in your custom place.
Feel free to re-open with more questions.
Comment #3
davemybes CreditAttribution: davemybes commentedI'm seeing the same issue where those icons disappeared. The popup's formatting is also missing - background and close button, etc. What seems to be happening is that the path to those images is relative to the map its appearing on e.g. img/north-mini.png. Turns out that this only happens if you aggregate the js. CSS aggregation doesn't affect this.
Comment #4
m.stentaThis sounds like a 7.x-2.x issue...
Comment #5
PolThis message is part of the issue cleanup initiative.
Openlayers 2.x has been deprecated since the release of Openlayers 3.x the 31 December 2015.
If you want to stay on 2.x, you should try with the latest version of the 2.x release.
However, I strongly encourage you to move on version 3.
Version 3 is much more stable than version 2. It does not yet contain all the features but the main ones are there.
I'll close this thread, feel free to reopen it if needed.
Thanks for your understanding.