Switch to using the local OpenLayers library on new and existing sites.
This commit is contained in:
parent
0d449a812b
commit
c08ed95333
13
farm.install
13
farm.install
|
@ -26,8 +26,8 @@ function farm_install() {
|
||||||
// Use the farm menu for primary links (provided by farm_admin).
|
// Use the farm menu for primary links (provided by farm_admin).
|
||||||
variable_set('menu_main_links_source', 'farm');
|
variable_set('menu_main_links_source', 'farm');
|
||||||
|
|
||||||
// Load Openlayers from CDNJS.
|
// Set the Openlayers library variant to local.
|
||||||
\Drupal\openlayers\Config::set('openlayers.variant', 'cdnjs:ol3:4.6.4');
|
\Drupal\openlayers\Config::set('openlayers.variant', 'local:4.6.4');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -742,6 +742,15 @@ function farm_update_7044(&$sandbox) {
|
||||||
_farm_update_enable_modules(array('farm_term'));
|
_farm_update_enable_modules(array('farm_term'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use local OpenLayers JS library instead of CDN.
|
||||||
|
*/
|
||||||
|
function farm_update_7045(&$sandbox) {
|
||||||
|
|
||||||
|
// Set the variant config in the Openlayers module.
|
||||||
|
\Drupal\openlayers\Config::set('openlayers.variant', 'local:4.6.4');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update helper function: enable modules.
|
* Update helper function: enable modules.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue