{% extends "Layout/default.html.twig" %}
{% block content %}
{{ include('Navigation/breadcrumb.html.twig') }}
{{ include('Includes/main-title-block-splitted-editable.html.twig') }}
<section class="content-block">
{% do jsConfig().add('googleMapAPIKey', googleApiKey()) %}
{% do jsConfig().add('googleMapsLibraries', ['places', 'geocoding']) %}
{% do jsConfig().add('ajaxForm', true) %}
{% do jsConfig().add('ajaxFormMap', true) %}
{% do jsConfig().add('interactiveMap', true) %}
{% embed 'Includes/editmode-settings.html.twig' %}
{% block additionalInfo %}
<div>
<label>
Longitude {{ pimcore_input('longitude', {placeholder: '14.306775'}) }}
</label>
</div>
<div>
<label>
Latitude {{ pimcore_input('latitude', {placeholder: '47.2183939'}) }}
</label>
</div>
<div>
<label>
Zoom {{ pimcore_numeric('map-zoom', {minValue: 0}) }}
</label>
</div>
{% endblock %}
{% endembed %}
<div class="js-ajax-form-map-google interactive-map position-relative"
data-google-map-initial-lng="{{ pimcore_input('longitude').empty ? '14.306775' : pimcore_input('longitude').data }}"
data-google-map-initial-lat="{{ pimcore_input('latitude').empty ? '47.2183939' : pimcore_input('latitude').data }}"
data-google-map-initial-zoom="{{ pimcore_numeric('map-zoom').empty ? "10" : pimcore_numeric('map-zoom').data }}"
data-ajax-form-add-url-params="true"
data-form-map-url="{{ path('im_pois', {'region': pimcore_relation('region').empty ? '' : pimcore_relation('region').element.id}) }}"
>
<div aria-live="polite">
{{ include('InteractiveMap/filter.html.twig') }}
{{ include('Includes/loading-overlay.html.twig', { styleModifier: 'js-ajax-form-map-google__loading' }) }}
<div class="js-ajax-form-map-google__map interactive-map__google-map" style="">
<div class="interactive-map__geo-location__wrapper">
<button type="button" data-target="#location" class="interactive-map__geo-location js-ajax-form-map-google__get-geo-location">{{ 'im.In meinem Umkreis suchen'|trans }}</button>
</div>
<div class="js-ajax-form-map-google__map__canvas interactive-map__map-canvas"></div>
</div>
</div>
</div>
</section>
{% endblock %}
{% block javascripts %}
{% if not app.request.get('onlyInlineCss') %}
{{ include('Layout/includes/encore.html.twig', {
'staticDebugMode': staticDebugMode,
'file': 'js/interactiveMap'
}) }}
{% endif %}
{% endblock %}