What is the proper directory structure and placement of the OpenLayers library when you download it from GitHub?
I've marked this as critical because the OpenLayers.org website has been dead for over 24 hours -- which means the hosted library is also unavailable, as is the ability to download the library or get it via drush. So the only way for people to fix their now broken maps is to get the library from GitHub.
I downloaded v2.13.1 from https://github.com/openlayers/openlayers and unzipped it into sites/all/libraries, but the openlayers config page in Drupal doesn't detect it. Can anyone help?
Comment | File | Size | Author |
---|---|---|---|
#10 | drupal-2233591-1.patch | 816 bytes | robertwb |
Comments
Comment #1
Ohoshi CreditAttribution: Ohoshi commentedComment #2
kruser CreditAttribution: kruser commentedThe option for internal does appear, but when I select it I get "Could not find a valid library with a Javascript client-side check; Value found: 0. Please visit the OpenLayers settings page for more details".
If I move the OpenLayers.js from /lib to libraries/openlayers/OpenLayers.js then it detects. However it can't find any of it's libraries, and watchdog is reporting it's trying to find them like http://192.168.1.100/lib/OpenLayers/Spherical.js
Comment #3
kruser CreditAttribution: kruser commentedUsing "drush dl-openlayers" worked great. Unfortunately the library installed with drush != a manual install from Git repo. The library via drush had a few more files in the base directory.
Comment #4
jantoine CreditAttribution: jantoine commentedYou have to be sure you are downloading the correct file from github.
The WRONG way
Using this method, the download will only contain the files that are in the repository and will not contain files that get built and included in each release.
The RIGHT way
Using this method will get you an official release containing the files that get built and are not included in the repository.
Comment #6
PolThanks for the explanation, I will put it on the project homepage.
Comment #7
brett_mcmullin CreditAttribution: brett_mcmullin commentedI followed the procedure of jantoine but found that the problem persisted until I also installed the latest dev version of Openlayers.
Comment #8
fonant CreditAttribution: fonant commentedI used the drush method, and the RIGHT way, both resulted in the same files under sites/all/libraries/openlayers.
Neither works with the "Original" OpenLayers internal source variant setting, but "Original debug" works fine.
Using OpenLayers 2 v2.13.1
Comment #9
robertwb CreditAttribution: robertwb commented@fonant - I too am having trouble, also doing it "the right way" but drupal will not allow me to update.php to complete an install of OL3. I do not understand your distinction between the "Original" and "Orginial Debug", as I do not know what is meant by the "OpenLayers internal source variant" -- any help would be much appreciated.
I fear this issue may not really be merit'ing the "closed" status.
Comment #10
robertwb CreditAttribution: robertwb commentedOK - so for me, I just fixed this by stashing the OL3 into "libraries/openlayers3". I tried every combo, "libraries/openlayers" namely and my guess is that this is reserved for OL2. I don't have drush on the box I am working on today and thus drush is not an option - so essentially, these instructions are critical. BTW - there is no README in the current version of the install.
I attach a completely ridiculous patch here, one that just tells the user to put it in "openlayers3" sub-directory. I am sure that a better patch would be to auto-detect the actuall version of OL in various combos of directories (OL3 release distro seems to like the sub-dir "ol"). At the very least in the "right way" install directions this should be mentioned.
Comment #11
byenary CreditAttribution: byenary commentedSame as #8 Original debug made it work for me.
Comment #12
kagongo CreditAttribution: kagongo commentedi have decide to make a fresh installation so that i can just use the suggested module Libraries CDN API
.
1. After i have installed drupal
2. installed Libraries CDN API = see this
-------------------------------------------------
Provides a unified API to connect to a CDN like CDNJS or jsDelivr.
Version: 7.x-1.7
Requires: Registry Autoload (enabled), Service Container (enabled), Chaos tools (enabled), Symfony's Services Container (enabled), Services Container Annotation Discovery (enabled)
------------------------------------------------------
3. When i switch to the installed openlayer it doesnt see this module libraries. see the result below
---------------------------------------------------------
Openlayers base API module
Version: 7.x-3.0-beta3
Requires: Libraries (missing), File (enabled), Field (enabled), Field SQL storage (enabled), Image (enabled), Service Container (enabled), Chaos tools (enabled), Registry Autoload (enabled), Symfony's Services Container (enabled), Services Container Annotation Discovery (enabled), jQuery Update (enabled)
Required by: OpenLayers Block (disabled), OpenLayers Block Switcher (disabled), OpenLayers UI (disabled), OpenLayers Contextual Links (disabled), OpenLayers Geofield (disabled), OpenLayers Examples (disabled), OpenLayers Views (disabled)
---------------------------------------------
Why should this happen.
Would be eager to hear from you
Kind Request Simon
Comment #13
Pol@kagongo: Make sure that you are using the development version of Openlayers. I'm planning to release a new beta during the Drupalcon. Then, when you go to admin/structure/openlayers, select the library version you want to use, eg: 3.9.0. Hit save, you're good to go now.
Comment #14
don@robertson.net.nz CreditAttribution: don@robertson.net.nz commentedHi - I have openlayers in an openlayers3 folder in my libraries folder, but it is not being detected. The status report says "The configured Openlayers library variant (local:3.11.2) was not found. "
I downloaded v3.11.2 and placed it in an openlayers3 folder in the libraries folder, cleared the cache, but library still not found.
On the admin/structure/openlayers page I have a select box titled select the library variant, but there are no entries.
Is the Library CDN module now required for Openlayers?
I am using the openlayers version 7.x-3.1+77-dev.
Should I be on the release version, or version 2 or what? I have been futzing around with this thing off and on for a couple of days and am not getting anywhere.