{namespace neos=Neos\Neos\ViewHelpers}
{namespace poi=Newland\Toubiz\Poi\Neos\ViewHelpers}

<f:if condition="{article.isTour} && {article.flatAttributes.dataSource}=='outdooractive'">
    <f:then>
        <f:render partial="PointOfInterests/Show/Tour/OutdoorActiveMap" arguments="{_all}"/>
    </f:then>
    <f:else>
        <f:if condition="{configuration.staticMap.apiKey} && {article.mainAddress.hasGeocoordinates}">
            <a href="#0" class="tb-static-map" itemtype="http://schema.org/Map">
                <f:render section="MapContent" arguments="{_all}"/>
            </a>
        </f:if>
    </f:else>
</f:if>

<f:section name="MapContent">
    <img 
        class="tb-static-map__image"
        src="https://maps.googleapis.com/maps/api/staticmap?center={article.mainAddress.latitude},{article.mainAddress.longitude}&zoom=13&scale=2&size=1024x300&key={configuration.staticMap.apiKey}"
        alt="Google Maps" />

    <div class="tb-static-map__marker">
        <div class="tb-static-map__marker-body">
            <svg>
                <use xlink:href="#tb-poi-static-map-marker-body"></use>
            </svg>
        </div>
        <div class="tb-static-map__marker-icon">
            <svg>
                <use xlink:href="#tb-poi-static-map-marker-icon"></use>
            </svg>
        </div>
    </div>
</f:section>
