Use Libraries CDN to load Openlayers.
This commit is contained in:
parent
c046354d70
commit
527ef0feea
|
@ -61,6 +61,9 @@ projects[jquery_update][version] = "3.0-alpha2"
|
|||
projects[libraries][subdir] = "contrib"
|
||||
projects[libraries][version] = "2.2"
|
||||
|
||||
projects[libraries_cdn][subdir] = "contrib"
|
||||
projects[libraries_cdn][version] = "1.6"
|
||||
|
||||
projects[log][subdir] = "contrib"
|
||||
projects[log][version] = "1.0"
|
||||
|
||||
|
@ -210,9 +213,5 @@ libraries[backbone][download][url] = "http://github.com/jashkenas/backbone/archi
|
|||
libraries[modernizr][download][type] = "get"
|
||||
libraries[modernizr][download][url] = "http://github.com/Modernizr/Modernizr/archive/v2.8.3.zip"
|
||||
|
||||
libraries[openlayers][download][type] = "get"
|
||||
libraries[openlayers][download][url] = "http://github.com/openlayers/ol3/releases/download/v3.7.0/v3.7.0.zip"
|
||||
libraries[openlayers][directory_name] = "openlayers3"
|
||||
|
||||
libraries[underscore][download][type] = "get"
|
||||
libraries[underscore][download][url] = "http://github.com/jashkenas/underscore/archive/1.7.0.zip"
|
||||
|
|
12
farm.install
12
farm.install
|
@ -115,6 +115,18 @@ function farm_update_7004(&$sandbox) {
|
|||
_farm_enable_modules(array('restws'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Load Openlayers via CDN.
|
||||
*/
|
||||
function farm_update_7005(&$sandbox) {
|
||||
|
||||
// Enable the Libraries CDN module.
|
||||
_farm_enable_modules(array('libraries_cdn'));
|
||||
|
||||
// Load Openlayers 3.8.2 from JSDelivr CDN.
|
||||
\Drupal\openlayers\Config::set('openlayers.variant', 'jsdelivr:ol3:3.8.2');
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function: enable modules.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue