Switch to using the local OpenLayers library on new and existing sites.

This commit is contained in:
Michael Stenta 2018-10-30 15:54:09 -04:00
parent 0d449a812b
commit c08ed95333
1 changed files with 11 additions and 2 deletions

View File

@ -26,8 +26,8 @@ function farm_install() {
// Use the farm menu for primary links (provided by farm_admin).
variable_set('menu_main_links_source', 'farm');
// Load Openlayers from CDNJS.
\Drupal\openlayers\Config::set('openlayers.variant', 'cdnjs:ol3:4.6.4');
// Set the Openlayers library variant to local.
\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'));
}
/**
* 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.
*/