Loading modules/geofield_map_extras/geofield_map_extras.module +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ function geofield_map_extras_theme($existing, $type, $theme, $path) { 'q' => NULL, 'apikey' => NULL, 'options_string' => NULL, 'title' => NULL, ], ], ]; Loading modules/geofield_map_extras/src/Plugin/Field/FieldFormatter/GeofieldGoogleEmbedMapFormatter.php +2 −0 Original line number Diff line number Diff line Loading @@ -208,6 +208,7 @@ class GeofieldGoogleEmbedMapFormatter extends FormatterBase implements Container public function viewElements(FieldItemListInterface $items, $langcode) { $elements = []; $settings = $this->getSettings(); $bundle = $items->getParent()->getEntity()->bundle(); foreach ($items as $delta => $item) { if ($item->isEmpty()) { Loading @@ -234,6 +235,7 @@ class GeofieldGoogleEmbedMapFormatter extends FormatterBase implements Container '#apikey' => (string) $this->getGmapApiKey(), '#q' => $q, '#options_string' => $options_string, '#title' => $this->t('Map of @bundle', ['@bundle' => $bundle]), ]; } Loading modules/geofield_map_extras/templates/geofield-embed-google-map.html.twig +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ width={{ width }} height={{ height }} frameborder="0" style="border:0" title="{{ title }}" src="https://www.google.com/maps/embed/v1/place?key={{ apikey }}&q={{ q }}{{ options_string }}" allowfullscreen> </iframe> </div> Loading
modules/geofield_map_extras/geofield_map_extras.module +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ function geofield_map_extras_theme($existing, $type, $theme, $path) { 'q' => NULL, 'apikey' => NULL, 'options_string' => NULL, 'title' => NULL, ], ], ]; Loading
modules/geofield_map_extras/src/Plugin/Field/FieldFormatter/GeofieldGoogleEmbedMapFormatter.php +2 −0 Original line number Diff line number Diff line Loading @@ -208,6 +208,7 @@ class GeofieldGoogleEmbedMapFormatter extends FormatterBase implements Container public function viewElements(FieldItemListInterface $items, $langcode) { $elements = []; $settings = $this->getSettings(); $bundle = $items->getParent()->getEntity()->bundle(); foreach ($items as $delta => $item) { if ($item->isEmpty()) { Loading @@ -234,6 +235,7 @@ class GeofieldGoogleEmbedMapFormatter extends FormatterBase implements Container '#apikey' => (string) $this->getGmapApiKey(), '#q' => $q, '#options_string' => $options_string, '#title' => $this->t('Map of @bundle', ['@bundle' => $bundle]), ]; } Loading
modules/geofield_map_extras/templates/geofield-embed-google-map.html.twig +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ width={{ width }} height={{ height }} frameborder="0" style="border:0" title="{{ title }}" src="https://www.google.com/maps/embed/v1/place?key={{ apikey }}&q={{ q }}{{ options_string }}" allowfullscreen> </iframe> </div>