google_map_field_embed.html.twig in Google Map Field 8
{% if infowindow is not empty %}
{% set showInfowindow = "true" %}
{% endif %}
<section class="google-map-field">
{% if name %}
<h2>{{ name }}</h2>
{% endif %}
{% if showInfowindow %}
<div class="map-infowindow" style="display:none;">{{ infowindow }}</div>
{% endif %}
<iframe
width="{{ width }}"
height="{{ height }}"
frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?key={{ api_key }}&q={{ lat }},{{ lon }}&zoom={{ zoom }}">
</iframe>
</section>
File
templates/google_map_field_embed.html.twig
View source
- {% if infowindow is not empty %}
- {% set showInfowindow = "true" %}
- {% endif %}
- <section class="google-map-field">
- {% if name %}
- <h2>{{ name }}</h2>
- {% endif %}
- {% if showInfowindow %}
- <div class="map-infowindow" style="display:none;">{{ infowindow }}</div>
- {% endif %}
- <iframe
- width="{{ width }}"
- height="{{ height }}"
- frameborder="0" style="border:0"
- src="https://www.google.com/maps/embed/v1/place?key={{ api_key }}&q={{ lat }},{{ lon }}&zoom={{ zoom }}">
- </iframe>
- </section>