You are here

protected function GeofieldGoogleStaticMapFormatter::getStaticMapOptions in Geofield Map 8.2

Retrieves options for the static map type.

Return value

array An associative array of map types where keys are type machine names, and values are their labels. The types are defined in https://developers.google.com/maps/documentation/maps-static/dev-guide#M...

2 calls to GeofieldGoogleStaticMapFormatter::getStaticMapOptions()
GeofieldGoogleStaticMapFormatter::settingsForm in modules/geofield_map_extras/src/Plugin/Field/FieldFormatter/GeofieldGoogleStaticMapFormatter.php
Returns a form to configure settings for the formatter.
GeofieldGoogleStaticMapFormatter::settingsSummary in modules/geofield_map_extras/src/Plugin/Field/FieldFormatter/GeofieldGoogleStaticMapFormatter.php
Returns a short summary for the current formatter settings.

File

modules/geofield_map_extras/src/Plugin/Field/FieldFormatter/GeofieldGoogleStaticMapFormatter.php, line 241

Class

GeofieldGoogleStaticMapFormatter
Plugin implementation of the 'geofield_static_google_map' formatter.

Namespace

Drupal\geofield_map_extras\Plugin\Field\FieldFormatter

Code

protected function getStaticMapOptions() {
  return [
    'roadmap' => $this
      ->t('Roadmap'),
    'satellite' => $this
      ->t('Satellite'),
    'terrain' => $this
      ->t('Terrain'),
    'hybrid' => $this
      ->t('Hybrid'),
  ];
}