diff --git a/modules/geolocation_google_maps/config/schema/geolocation_google_maps.schema.yml b/modules/geolocation_google_maps/config/schema/geolocation_google_maps.schema.yml
index bc58491..128f935 100644
--- a/modules/geolocation_google_maps/config/schema/geolocation_google_maps.schema.yml
+++ b/modules/geolocation_google_maps/config/schema/geolocation_google_maps.schema.yml
@@ -14,7 +14,10 @@ geolocation_google_maps.settings:
     china_mode:
       type: boolean
       label: 'China mode'
-    google_map_custom_url_parameters:
+    google_maps_base_url:
+      type: string
+      label: 'Google Maps Base URL Override'
+  google_map_custom_url_parameters:
       type: mapping
       label: 'Additional Google Maps API parameters'
       mapping:
diff --git a/modules/geolocation_google_maps/geolocation_google_maps.module b/modules/geolocation_google_maps/geolocation_google_maps.module
index e69de29..a5ceaec 100644
--- a/modules/geolocation_google_maps/geolocation_google_maps.module
+++ b/modules/geolocation_google_maps/geolocation_google_maps.module
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * @file
+ * Google Maps hooks.
+ */
+
+/**
+ * Implements hook_library_info_build().
+ */
+function geolocation_google_maps_library_info_build() {
+  $libraries = [];
+  $libraries['google'] = [
+    'version' => '1.x',
+    'js' => [
+      Drupal::service('plugin.manager.geolocation.mapprovider')->getMapProvider('google_maps')->getGoogleMapsApiUrl() => [
+        'type' => 'external',
+      ],
+    ],
+  ];
+
+  return $libraries;
+}
diff --git a/modules/geolocation_google_maps/js/geolocation-google-maps-api.js b/modules/geolocation_google_maps/js/geolocation-google-maps-api.js
index 5f55dce..9afb417 100644
--- a/modules/geolocation_google_maps/js/geolocation-google-maps-api.js
+++ b/modules/geolocation_google_maps/js/geolocation-google-maps-api.js
@@ -351,23 +339,7 @@
   Drupal.geolocation.google.load = function () {
     // Check for Google Maps.
     if (typeof google === 'undefined' || typeof google.maps === 'undefined') {
-      if (Drupal.geolocation.google.maps_api_loading === true) {
-        return;
-      }
-
-      Drupal.geolocation.google.maps_api_loading = true;
-      // Google Maps isn't loaded so lazy load Google Maps.
-      // This will trigger googleCallback() again!
-      if (typeof drupalSettings.geolocation.google_map_url !== 'undefined') {
-        $.getScript(drupalSettings.geolocation.google_map_url)
-          .done(function () {
-            Drupal.geolocation.google.maps_api_loading = false;
-          });
-      }
-      else {
-        console.error('Geolocation - GoogleMapsAPI url not set.'); // eslint-disable-line no-console
-      }
-
+      console.error('Geolocation - GoogleMapsAPI url not set.'); // eslint-disable-line no-console
       return;
     }
 
diff --git a/modules/geolocation_google_maps/modules/geolocation_google_places_api/src/Plugin/geolocation/Geocoder/GooglePlacesAPI.php b/modules/geolocation_google_maps/modules/geolocation_google_places_api/src/Plugin/geolocation/Geocoder/GooglePlacesAPI.php
index 5417a96..920f4b8 100644
--- a/modules/geolocation_google_maps/modules/geolocation_google_places_api/src/Plugin/geolocation/Geocoder/GooglePlacesAPI.php
+++ b/modules/geolocation_google_maps/modules/geolocation_google_places_api/src/Plugin/geolocation/Geocoder/GooglePlacesAPI.php
@@ -91,10 +91,16 @@ class GooglePlacesAPI extends GoogleGeocoderBase {
     }
 
     try {
-      $details_url = GoogleMaps::$GOOGLEMAPSAPIURLBASE;
-      if ($config->get('china_mode')) {
+      if (!empty($config->get('google_maps_base_url'))) {
+        $details_url = $config->get('google_maps_base_url');
+      }
+      elseif ($config->get('china_mode')) {
         $details_url = GoogleMaps::$GOOGLEMAPSAPIURLBASECHINA;
       }
+      else {
+        $details_url = GoogleMaps::$GOOGLEMAPSAPIURLBASE;
+      }
+
       $details_url .= '/maps/api/place/details/json?placeid=' . $result['predictions'][0]['place_id'];
 
       if (!empty($google_key)) {
diff --git a/modules/geolocation_google_maps/src/Form/GeolocationGoogleMapsSettings.php b/modules/geolocation_google_maps/src/Form/GeolocationGoogleMapsSettings.php
index 5ca8bc8..b8fe8b2 100644
--- a/modules/geolocation_google_maps/src/Form/GeolocationGoogleMapsSettings.php
+++ b/modules/geolocation_google_maps/src/Form/GeolocationGoogleMapsSettings.php
@@ -128,6 +128,13 @@ class GeolocationGoogleMapsSettings extends ConfigFormBase {
       '#description' => $this->t('Use the specific URLs required in the PR China. See explanation at <a href=":google_faq">Google FAQ</a>.', [':google_faq' => 'https://developers.google.com/maps/faq?hl=de#china_ws_access']),
     ];
 
+    $form['google_maps_base_url'] = [
+      '#type' => 'textfield',
+      '#title' => $this->t('Google Maps Base URL Override'),
+      '#default_value' => $config->get('google_maps_base_url'),
+      '#description' => $this->t('Override Google Maps URL base entirely.'),
+    ];
+
     return parent::buildForm($form, $form_state);
   }
 
@@ -186,6 +193,7 @@ class GeolocationGoogleMapsSettings extends ConfigFormBase {
 
     $config->set('use_current_language', $form_state->getValue('use_current_language'));
     $config->set('china_mode', $form_state->getValue('china_mode'));
+    $config->set('google_maps_base_url', $form_state->getValue('google_maps_base_url'));
 
     $parameters = $form_state->getValue('parameters');
     unset($parameters['libraries']['add']);
diff --git a/modules/geolocation_google_maps/src/GoogleGeocoderBase.php b/modules/geolocation_google_maps/src/GoogleGeocoderBase.php
index 6a51a07..7295bb0 100644
--- a/modules/geolocation_google_maps/src/GoogleGeocoderBase.php
+++ b/modules/geolocation_google_maps/src/GoogleGeocoderBase.php
@@ -124,10 +124,8 @@ abstract class GoogleGeocoderBase extends GeocoderBase implements ContainerFacto
     $render_array['#attached'] = BubbleableMetadata::mergeAttachments(
       empty($render_array['#attached']) ? [] : $render_array['#attached'],
       [
-        'drupalSettings' => [
-          'geolocation' => [
-            'google_map_url' => $this->googleMapsProvider->getGoogleMapsApiUrl(),
-          ],
+        'library' => [
+          'geolocation_google_maps/google',
         ],
       ]
     );
diff --git a/modules/geolocation_google_maps/src/GoogleMapsProviderBase.php b/modules/geolocation_google_maps/src/GoogleMapsProviderBase.php
index c5a3ac8..d188a24 100644
--- a/modules/geolocation_google_maps/src/GoogleMapsProviderBase.php
+++ b/modules/geolocation_google_maps/src/GoogleMapsProviderBase.php
@@ -101,10 +101,15 @@ abstract class GoogleMapsProviderBase extends MapProviderBase {
   public function getGoogleMapsApiUrl(array $additional_parameters = []) {
     $config = \Drupal::config('geolocation_google_maps.settings');
 
-    $google_url = static::$GOOGLEMAPSAPIURLBASE;
-    if ($config->get('china_mode')) {
+    if (!empty($config->get('google_maps_base_url'))) {
+      $google_url = $config->get('google_maps_base_url');
+    }
+    elseif ($config->get('china_mode')) {
       $google_url = static::$GOOGLEMAPSAPIURLBASECHINA;
     }
+    else {
+      $google_url = static::$GOOGLEMAPSAPIURLBASE;
+    }
 
     $parameters = [];
     foreach ($this->getGoogleMapsApiParameters($additional_parameters) as $parameter => $value) {
diff --git a/modules/geolocation_google_maps/src/Plugin/geolocation/Geocoder/GoogleGeocodingAPI.php b/modules/geolocation_google_maps/src/Plugin/geolocation/Geocoder/GoogleGeocodingAPI.php
index b2bba73..c3da524 100644
--- a/modules/geolocation_google_maps/src/Plugin/geolocation/Geocoder/GoogleGeocodingAPI.php
+++ b/modules/geolocation_google_maps/src/Plugin/geolocation/Geocoder/GoogleGeocodingAPI.php
@@ -54,10 +54,15 @@ class GoogleGeocodingAPI extends GoogleGeocoderBase {
       return FALSE;
     }
 
-    $request_url = GoogleMaps::$GOOGLEMAPSAPIURLBASE;
-    if ($config->get('china_mode')) {
+    if (!empty($config->get('google_maps_base_url'))) {
+      $request_url = $config->get('google_maps_base_url');
+    }
+    elseif ($config->get('china_mode')) {
       $request_url = GoogleMaps::$GOOGLEMAPSAPIURLBASECHINA;
     }
+    else {
+      $request_url = GoogleMaps::$GOOGLEMAPSAPIURLBASE;
+    }
     $request_url .= '/maps/api/geocode/json?address=' . $address;
 
     if (!empty($config->get('google_map_api_server_key'))) {
diff --git a/modules/geolocation_google_maps/src/Plugin/geolocation/MapProvider/GoogleMaps.php b/modules/geolocation_google_maps/src/Plugin/geolocation/MapProvider/GoogleMaps.php
index f592eb8..1bfddbb 100644
--- a/modules/geolocation_google_maps/src/Plugin/geolocation/MapProvider/GoogleMaps.php
+++ b/modules/geolocation_google_maps/src/Plugin/geolocation/MapProvider/GoogleMaps.php
@@ -240,11 +213,11 @@ class GoogleMaps extends GoogleMapsProviderBase {
       empty($render_array['#attached']) ? [] : $render_array['#attached'],
       [
         'library' => [
+          'geolocation_google_maps/google',
           'geolocation_google_maps/googlemapsapi',
         ],
         'drupalSettings' => [
           'geolocation' => [
-            'google_map_url' => $this->getGoogleMapsApiUrl(),
             'maps' => [
               $render_array['#id'] => [
                 'settings' => [
