You are here

geofield-embed-google-map.html.twig in Geofield Map 8.2

Displays the Geofield Google Map (embed) formatter.

Available variables:

  • width: Width of map.
  • height: Height of map.
  • q: The place address / location string, url-escaped.
  • apikey: Google Maps API key.

File

modules/geofield_map_extras/templates/geofield-embed-google-map.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Displays the Geofield Google Map (embed) formatter.
  5. *
  6. * Available variables:
  7. * - width: Width of map.
  8. * - height: Height of map.
  9. * - q: The place address / location string, url-escaped.
  10. * - apikey: Google Maps API key.
  11. *
  12. * @ingroup themeable
  13. */
  14. #}
  15. <div class="geofield-embed-google-map">
  16. <iframe
  17. width={{ width }}
  18. height={{ height }}
  19. frameborder="0" style="border:0"
  20. title="{{ title }}"
  21. src="https://www.google.com/maps/embed/v1/place?key={{ apikey }}&q={{ q }}{{ options_string }}" allowfullscreen>
  22. </iframe>
  23. </div>