You are here

public function GoogleMaps::getGoogleMapsApiParameters in Geolocation Field 8.2

Same name and namespace in other branches
  1. 8.3 modules/geolocation_google_maps/src/Plugin/geolocation/MapProvider/GoogleMaps.php \Drupal\geolocation_google_maps\Plugin\geolocation\MapProvider\GoogleMaps::getGoogleMapsApiParameters()

Return all module and custom defined parameters.

Parameters

array $additional_parameters: Additional parameters.

Return value

array Parameters

Overrides GoogleMapsProviderBase::getGoogleMapsApiParameters

File

modules/geolocation_google_maps/src/Plugin/geolocation/MapProvider/GoogleMaps.php, line 41

Class

GoogleMaps
Provides Google Maps.

Namespace

Drupal\geolocation_google_maps\Plugin\geolocation\MapProvider

Code

public function getGoogleMapsApiParameters(array $additional_parameters = []) {
  $parameters = parent::getGoogleMapsApiParameters($additional_parameters);
  $parameters['callback'] = 'Drupal.geolocation.google.load';
  if (!empty($parameters['client'])) {
    unset($parameters['key']);
  }
  return $parameters;
}