{% extends './public/layout.html.twig' %}
{% block title %}{{ prospect.emprunteurPrenom|lower|capitalize }} {{ prospect.emprunteurNom }} {{ lot.programme ? '| ' ~ lot.programme }} {% endblock %}
{% block detail_lot %}
<div class="title-description">
<h2 class="lot-name text-bold">{{lot.programme|upper}}</h2>
<h3 class="lot-size mb-0">{{ lot.type|upper }} {% if lot.reference is not empty %}- {{ lot.reference }}{% endif %}</h3>
</div>
<ul class="criteres-description">
{% if lot.etage is not empty %} <li>Etage :<span class="critere-description"> {{ lot.etage|upper }} </span></li> {% endif %}
{% if lot.superficie is not empty %} <li>Superficie :<span class="critere-description"> {{ lot.superficie }}m²</span></li> {% endif %}
{% if lot.jardin is not empty %} <li>Jardin :<span class="critere-description"> {{ lot.jardin }}m²</span></li> {% endif %}
{% if lot.terrasse is not empty %} <li>Terrasse :<span class="critere-description"> {{ lot.terrasse }}m²</span></li> {% endif %}
{% if lot.terrasse2 is not empty %} <li>2<sup>ème</sup> terrasse :<span class="critere-description"> {{ lot.terrasse2 }}m²</span></li> {% endif %}
{% if lot.orientation is not empty %} <li>Orientation :<span class="critere-description"> {{ lot.orientation|upper }}</span></li> {% endif %}
{% if lot.prix is not empty %} <li>Prix :<span class="critere-description"> {{lot.prix|number_format(0, '', '.')}} €</span></li> {% endif %}
{% if lot.annexes is not empty %} <li>Annexe(s) incluse(s) :<span class="critere-description"> {{ lot.annexes|upper }}</span></li> {% endif %}
{% if lot.fraisNotaireInclus is not empty %} <li>Frais de notaire {% if lot.fraisNotaireType is null or lot.fraisNotaireType == 'reduits' %} réduits{% endif %} :<span class="critere-description"> {{ lot.fraisNotaireInclus|number_format(0, '', '.')}} €</span></li>{% endif %}
{% if lot.programmeParent.visuLivraison %}
{% if lot.livraison is not empty %} <li>Livraison :<span class="critere-description"> {{ lot.livraison|upper }}</span></li> {% endif %}
{% endif %}
{% if lot.description is not empty %} <li><span class="critere-description"><p class="notes-lot"> {{ (lot.description|striptags)|raw }}</p></span></li> {% endif %}
{% if lot.programmeParent.noteGlobale is not empty %} <li><hr class="my-2"><span class="critere-description"><p class="notes-lot">{{ (lot.programmeParent.noteGlobale|striptags)|raw }}</p></span></li> {% endif %}
</ul>
{% if lot.brochure %}
<div class="download-brochure shadow mt-2">
<a class="download-brochure-a" download target="_blank" href="{{ asset('uploads/brochures/' ~ lot.brochure) }}">
<span class="download-brochure-content download-brochure-content-invisible">
{# <img class="download-arrow" src="{{ asset('build/images/download-icon.svg') }}"/> #}
<span>{{ lot.programmeParent.libelleBrochure is not empty ? lot.programmeParent.libelleBrochure : 'Télécharger la brochure' }}</span>
</span>
<span class="download-brochure-content download-brochure-content-absolute">
<span>{{ lot.programmeParent.libelleBrochure is not empty ? lot.programmeParent.libelleBrochure : 'Télécharger la brochure' }}</span>
</span>
</a>
</div>
{% endif %}
{% endblock %}
{% block dropdownLotsNav %}
{% set nblot = 0 %}
{% set actualProp = "" %}
{% for key, proposition in propositions %}
{% if proposition.lot.id == lot.id %}
{% set nblot = key %}
{% set actualProp = proposition %}
{% endif %}
{% endfor %}
{% set nbItemMenu = 1 %}
{% if actualProp != "" %}
<div class="dropdown opacity-0 lot-{{ (nblot%6)+1 }}">
<span class="before"></span>
<a class="btn dropdown-toggle navbar-lot-menu d-flex align-items-center " href="#" role="button" id="dropdownMenuLink" data-bs-toggle="dropdown" aria-expanded="false">
<span class="text-center">
{{actualProp.lot.reference}}
</span>
<div class="down">
<span class="down-icon">
<i class="fas fa-caret-down"></i>
</span>
</div>
</a>
<span class="after"></span>
</div>
{% endif %}
{% endblock %}
{# {% block recapNav %}
<div class="dropdown recap opacity-0 lot-1">
<span class="before"></span>
<a class="btn navbar-lot-menu d-flex align-items-center " href="{{ path('public_prospect_short', {token: prospect.token, recap: true}) }}">
<span class="text-center">
RECAP'
</span>
</a>
<span class="after"></span>
</div>
{% endblock %} #}
{% block main %}
{% set lastProp = false %}
{% set nextProp = {
'num' : 0,
'prop' : null
} %}
<div class="lot-page">
<ul class="dropdown-menu" aria-labelledby="dropdownMenuLink">
{% for key, proposition in propositions %}
<li class="lot-{{ (key%6)+1 }}">
<a class="dropdown-item" href="{{ path('public_lot', {token: prospect.token, id: proposition.lot.id}) }}">
<span class="text-center">{{proposition.lot.type|slice(0,6)}} {{proposition.lot.reference }}</span>
</a>
</li>
{% if proposition.lot.id == lot.id and (key + 1) < propositions|length %}
{% set nextProp = {
'num' : key + 2,
'prop' : propositions[key + 1]
}
%}
{% endif %}
{% endfor %}
{# <li class="lot-6"><a class="dropdown-item" href="{{ path('public_prospect_short', {token: prospect.token, recap: true}) }}"><span class="text-center">RECAP'</span></a></li> #}
</ul>
<div class="container-fluid p-0 content-lot slider " >
<div class="progress-container">
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
{% set combinedPjs = (programmePjs|merge(lot.pjs))|filter(pj => pj.showPublic) %}
{% set NB_SLIDES = 2 + combinedPjs|length %}
<script type="text/javascript">
var NB_SLIDES = {{ NB_SLIDES }};
</script>
<div class="owl-carousel owl-carousel-lot">
<div class="slide slide-localisation" data-slide-title="Localisation">
<div class="container-fluid-content">
<div class="col-3 map-buttons d-flex flex-column align-items-end justify-content-end">
<a class="btn-rounded-white download-pdf map my-2" id="map_switch" href="#"><i id="satellite_logo" class="fa fa-globe" style="display:none;"></i><i id="roadmap_logo" class="fa fa-map"></i></a>
<a class="btn-rounded-white download-pdf resize my-2" id="map_minus" href="#"><i id="btn-moins" class="fa fa-minus"></i></a>
<a class="btn-rounded-white pdf-btn-resize resize my-2" id="map_plus" href="#"><i id="btn-plus" class="fa fa-plus"></i></a>
</div>
<div class="content-map" id="map"></div>
<div class="lot-content d-flex close">
<div role="button" class="drag-btn d-flex align-items-center justify-content-center shadow">
<img class="drag-icon-arrow ml-4" src="{{ asset('build/images/drag-icon-right-arrow.png') }}"/>
</div>
<div class="detail-content d-flex flex-column">
{{ block('detail_lot') }}
</div>
</div>
</div>
{% if nextProp['prop'] != null %}
<a class="owl-next-proposition" href="{{ path('public_lot', {token: nextProp.prop.prospect.token, id: nextProp.prop.lot.id}) }}"></a>
{% else %}
{% if prospect.id is null %}
<a class="owl-next-proposition" href="{{ path('public_prospect_short', {token: app.session.get('propositions')[0].prospect.token, recap: true}) }}"></a>
{% else %}
<a class="owl-next-proposition" href="{{ path('public_prospect_short', {token: prospect.token, recap: true}) }}"></a>
{% endif %}
{% endif %}
</div>
{% for n,pj in combinedPjs %}
<div class="slide slide-pdf slide-plan-lot" data-slide-title="{{pj.descriptionCourte}}">
<div class="container-fluid-content">
<div class="col-3 pdf-buttons d-flex flex-column align-items-end justify-content-end justify-content-end">
{% if pj.filename is not null and pj.filename|unserialize is not null %}
{% if (pj.filename|unserialize)[0]|replace({'-0.png': '.pdf'})|file_exists %}
<a class="btn-rounded-white my-2 download-pdf-image download-pdf" download href="{{ asset((pj.filename|unserialize)[0]|replace({'-0.png': '.pdf'})) }}">
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 227.14 334.2" style="enable-background:new 0 0 227.14 334.2;" xml:space="preserve">
<style type="text/css">
.st0{fill:#2D3642;}
.st1{fill:#2E3743;}
</style>
<g>
<path class="st0" d="M165.54,67.27c0,19.09,0.09,38.18-0.08,57.27c-0.03,3.59,0.68,4.79,4.55,4.72
c15.09-0.26,30.18-0.05,45.28-0.14c3.59-0.02,6.43,0.81,8.2,4.26c1.89,3.69,0.01,6.52-2.18,8.94
c-12.21,13.48-24.62,26.78-36.87,40.23c-14.89,16.36-29.68,32.81-44.53,49.2c-6.99,7.71-13.98,15.43-21.11,23.03
c-3.49,3.72-8.06,3.54-11.62-0.38c-18.76-20.65-37.43-41.39-56.2-62.03c-12.46-13.7-25.05-27.28-37.57-40.93
c-3.12-3.41-6.21-6.85-9.3-10.28c-2.08-2.31-2.84-5.05-1.36-7.78c1.45-2.66,3.58-4.35,7.16-4.3c14.76,0.2,29.52-0.09,44.28,0.19
c4.31,0.08,5.56-0.92,5.53-5.41c-0.2-37.02-0.12-74.04-0.1-111.05c0-1.82-0.04-3.68,0.35-5.44c0.78-3.6,2.88-5.74,6.88-5.74
c30.68,0.04,61.37,0,92.05,0.04c4.46,0.01,6.64,2.66,6.64,7.83C165.55,28.76,165.54,48.01,165.54,67.27z"/>
<path class="st1" d="M113.33,331.39c-34.51,0-69.02,0-103.53,0c-5.98,0-7.18-1.22-7.19-7.29c-0.02-11.13-0.04-22.25,0.01-33.38
c0.02-5.46,1.69-7.15,7.14-7.15c69.02-0.02,138.04-0.03,207.07,0c5.2,0,6.62,1.54,6.64,6.94c0.03,11.46,0.03,22.92,0,34.38
c-0.01,5.97-0.55,6.5-6.6,6.5C182.35,331.4,147.84,331.39,113.33,331.39z"/>
</g>
</svg>
</a>
{% else %}
<a class="btn-rounded-white my-2 download-pdf-image download-pdf" download href="{{ asset((pj.filename|unserialize)[0]) }}">
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 227.14 334.2" style="enable-background:new 0 0 227.14 334.2;" xml:space="preserve">
<g>
<path class="st0" d="M165.54,67.27c0,19.09,0.09,38.18-0.08,57.27c-0.03,3.59,0.68,4.79,4.55,4.72
c15.09-0.26,30.18-0.05,45.28-0.14c3.59-0.02,6.43,0.81,8.2,4.26c1.89,3.69,0.01,6.52-2.18,8.94
c-12.21,13.48-24.62,26.78-36.87,40.23c-14.89,16.36-29.68,32.81-44.53,49.2c-6.99,7.71-13.98,15.43-21.11,23.03
c-3.49,3.72-8.06,3.54-11.62-0.38c-18.76-20.65-37.43-41.39-56.2-62.03c-12.46-13.7-25.05-27.28-37.57-40.93
c-3.12-3.41-6.21-6.85-9.3-10.28c-2.08-2.31-2.84-5.05-1.36-7.78c1.45-2.66,3.58-4.35,7.16-4.3c14.76,0.2,29.52-0.09,44.28,0.19
c4.31,0.08,5.56-0.92,5.53-5.41c-0.2-37.02-0.12-74.04-0.1-111.05c0-1.82-0.04-3.68,0.35-5.44c0.78-3.6,2.88-5.74,6.88-5.74
c30.68,0.04,61.37,0,92.05,0.04c4.46,0.01,6.64,2.66,6.64,7.83C165.55,28.76,165.54,48.01,165.54,67.27z"/>
<path class="st1" d="M113.33,331.39c-34.51,0-69.02,0-103.53,0c-5.98,0-7.18-1.22-7.19-7.29c-0.02-11.13-0.04-22.25,0.01-33.38
c0.02-5.46,1.69-7.15,7.14-7.15c69.02-0.02,138.04-0.03,207.07,0c5.2,0,6.62,1.54,6.64,6.94c0.03,11.46,0.03,22.92,0,34.38
c-0.01,5.97-0.55,6.5-6.6,6.5C182.35,331.4,147.84,331.39,113.33,331.39z"/>
</g>
</svg>
</a>
{% endif %}
{% else %}
<a class="btn-rounded-white my-2 download-pdf-image download-pdf" download href="{{ asset('uploads/pieces_jointes/' ~ pj.filename) }}">
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 227.14 334.2" style="enable-background:new 0 0 227.14 334.2;" xml:space="preserve">
<g>
<path class="st0" d="M165.54,67.27c0,19.09,0.09,38.18-0.08,57.27c-0.03,3.59,0.68,4.79,4.55,4.72
c15.09-0.26,30.18-0.05,45.28-0.14c3.59-0.02,6.43,0.81,8.2,4.26c1.89,3.69,0.01,6.52-2.18,8.94
c-12.21,13.48-24.62,26.78-36.87,40.23c-14.89,16.36-29.68,32.81-44.53,49.2c-6.99,7.71-13.98,15.43-21.11,23.03
c-3.49,3.72-8.06,3.54-11.62-0.38c-18.76-20.65-37.43-41.39-56.2-62.03c-12.46-13.7-25.05-27.28-37.57-40.93
c-3.12-3.41-6.21-6.85-9.3-10.28c-2.08-2.31-2.84-5.05-1.36-7.78c1.45-2.66,3.58-4.35,7.16-4.3c14.76,0.2,29.52-0.09,44.28,0.19
c4.31,0.08,5.56-0.92,5.53-5.41c-0.2-37.02-0.12-74.04-0.1-111.05c0-1.82-0.04-3.68,0.35-5.44c0.78-3.6,2.88-5.74,6.88-5.74
c30.68,0.04,61.37,0,92.05,0.04c4.46,0.01,6.64,2.66,6.64,7.83C165.55,28.76,165.54,48.01,165.54,67.27z"/>
<path class="st1" d="M113.33,331.39c-34.51,0-69.02,0-103.53,0c-5.98,0-7.18-1.22-7.19-7.29c-0.02-11.13-0.04-22.25,0.01-33.38
c0.02-5.46,1.69-7.15,7.14-7.15c69.02-0.02,138.04-0.03,207.07,0c5.2,0,6.62,1.54,6.64,6.94c0.03,11.46,0.03,22.92,0,34.38
c-0.01,5.97-0.55,6.5-6.6,6.5C182.35,331.4,147.84,331.39,113.33,331.39z"/>
</g>
</svg>
</a>
{% endif %}
<a class="btn-rounded-white my-2 download-pdf resize resize-moins" id="img_minus" href="#"><i id="btn-moins" class="fa fa-minus"></i></a>
<a class="btn-rounded-white my-2 resize resize-plus" id="img_plus" href="#"><i id="btn-plus" class="fa fa-plus"></i></a>
</div>
<div class="viewer-pdf">
<div id="viewer_n{{ n }}" class="pdf-viewer-iframe">
{% if pj.filename|unserialize is not null %}
{% for img in pj.filename|unserialize %}
<img class="img-download" loading="lazy" src="{{ asset(img) }}" /><br/>
{% else %}
<img class="img-download" loading="lazy" src="{{ asset('uploads/pieces_jointes/' ~ pj.filename) }}" />
{% endfor %}
{% else %}
<img class="img-download" loading="lazy" src="{{ asset('uploads/pieces_jointes/' ~ pj.filename) }}" />
{% endif %}
</div>
</div>
<div class="lot-content d-flex">
<div role="button" class="drag-btn d-flex align-items-center justify-content-center shadow">
<img class="drag-icon-arrow ml-4" src="{{ asset('build/images/drag-icon-right-arrow.png') }}"/>
</div>
<div class="detail-content d-flex flex-column">
{{ block('detail_lot') }}
</div>
</div>
</div>
{% if nextProp['prop'] != null %}
<a class="owl-next-proposition" href="{{ path('public_lot', {token: nextProp.prop.prospect.token, id: nextProp.prop.lot.id}) }}"></a>
{% else %}
{% if prospect.id is null %}
<a class="owl-next-proposition" href="{{ path('public_prospect_short', {token: app.session.get('propositions')[0].prospect.token, recap: true}) }}"></a>
{% else %}
<a class="owl-next-proposition" href="{{ path('public_prospect_short', {token: prospect.token, recap: true}) }}"></a>
{% endif %}
{% endif %}
</div>
{% endfor %}
{% if lot.planMasse != null %}
<div class="slide{% if nextProp['prop'] != null%} slide-next-proposition {% endif %} slide-pdf slide-plan-lot" data-hash="planMasse" data-slide-title="Plan masse">
<div class="container-fluid-content">
<div class="col-3 pdf-buttons d-flex flex-column align-items-end justify-content-end">
{% set pathDownload = ''%}
{% if lot.planMasse|unserialize is not null %}
{% if (lot.planMasse|unserialize)[0] != null %}
{% set pathDownload = (lot.planMasse|unserialize)[0]|replace({'-0.png': '.pdf'}) %}
{% endif %}
{% else %}
<a class="btn-rounded-white my-2 download-pdf-image download-pdf" download href="{{ asset('uploads/pieces_jointes/' ~ lot.planMasse) }}">
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 227.14 334.2" style="enable-background:new 0 0 227.14 334.2;" xml:space="preserve">
<g>
<path class="st0" d="M165.54,67.27c0,19.09,0.09,38.18-0.08,57.27c-0.03,3.59,0.68,4.79,4.55,4.72
c15.09-0.26,30.18-0.05,45.28-0.14c3.59-0.02,6.43,0.81,8.2,4.26c1.89,3.69,0.01,6.52-2.18,8.94
c-12.21,13.48-24.62,26.78-36.87,40.23c-14.89,16.36-29.68,32.81-44.53,49.2c-6.99,7.71-13.98,15.43-21.11,23.03
c-3.49,3.72-8.06,3.54-11.62-0.38c-18.76-20.65-37.43-41.39-56.2-62.03c-12.46-13.7-25.05-27.28-37.57-40.93
c-3.12-3.41-6.21-6.85-9.3-10.28c-2.08-2.31-2.84-5.05-1.36-7.78c1.45-2.66,3.58-4.35,7.16-4.3c14.76,0.2,29.52-0.09,44.28,0.19
c4.31,0.08,5.56-0.92,5.53-5.41c-0.2-37.02-0.12-74.04-0.1-111.05c0-1.82-0.04-3.68,0.35-5.44c0.78-3.6,2.88-5.74,6.88-5.74
c30.68,0.04,61.37,0,92.05,0.04c4.46,0.01,6.64,2.66,6.64,7.83C165.55,28.76,165.54,48.01,165.54,67.27z"/>
<path class="st1" d="M113.33,331.39c-34.51,0-69.02,0-103.53,0c-5.98,0-7.18-1.22-7.19-7.29c-0.02-11.13-0.04-22.25,0.01-33.38
c0.02-5.46,1.69-7.15,7.14-7.15c69.02-0.02,138.04-0.03,207.07,0c5.2,0,6.62,1.54,6.64,6.94c0.03,11.46,0.03,22.92,0,34.38
c-0.01,5.97-0.55,6.5-6.6,6.5C182.35,331.4,147.84,331.39,113.33,331.39z"/>
</g>
</svg>
</a>
{% endif %}
<a class="btn-rounded-white my-2 download-pdf resize resize-moins" id="img_minus" href="#"><i id="btn-moins" class="fa fa-minus"></i></a>
<a class="btn-rounded-white my-2 resize resize-plus" id="img_plus" href="#"><i id="btn-plus" class="fa fa-plus"></i></a>
</div>
<div class="viewer-pdf">
<div id="viewer_n{{ lot.pjs|length }}" class="pdf-viewer-iframe">
{% if lot.planMasse|unserialize is not null %}
{% for img in lot.planMasse|unserialize %}
<img class="img-download" loading="lazy" src="{{ asset(img) }}"/><br/>
{% endfor %}
{% else %}
<img class="img-download" loading="lazy" src="{{ asset('uploads/plans_masse/' ~ lot.planMasse) }}"/>
{% endif %}
</div>
</div>
<div class="lot-content d-flex">
<div role="button" class="drag-btn d-flex align-items-center justify-content-center shadow">
<img class="drag-icon-arrow ml-4" src="{{ asset('build/images/drag-icon-right-arrow.png') }}"/>
</div>
<div class="detail-content d-flex flex-column">
{{ block('detail_lot') }}
</div>
</div>
</div>
</div>
{% endif %}
{% if nextProp['prop'] != null %}
<div class="slide slide-next-proposition" id="slideNextProp" data-slide-title="Proposition n°{{ nextProp.num }}">
<div class="container-fluid-content container-fluid p-0" style="background-image:url({{ asset('uploads/lots_images/' ~ nextProp.prop.lot.image) }});">
<div class="d-flex flex-column" style="justify-content:space-evenly;height:calc(100vh - calc(4.8vh + 2px + 2px + 17vh));">
<div class="container-next-prop mx-auto">
<div class="lot-item active-loading">
<a href="{{ path('public_lot', {token: nextProp.prop.prospect.token, id: nextProp.prop.lot.id}) }}" class="noAnim link-card-item active-loading">
<div class="hide-zoom-in d-flex flex-column justify-content-end card-lot-item">
<div class="noAnim bg-img-lot" style="background-image: url({{ asset('uploads/lots_images/' ~ nextProp.prop.lot.image) }});"></div>
<div class="d-flex justify-content-between align-items-end mb-1">
<div class="text-white text-right col-10">
<h3 class="lot-name mb-0">{{nextProp.prop.lot.reference}} - {{nextProp.prop.lot.ville|upper}}</h3>
<h2 class="lot-size text-bold">{{nextProp.prop.lot.type|upper}} - {{ nextProp.prop.lot.Superficie }}m²</h2>
</div>
<div class="num num-{{ (nextProp.num-1) % 6 }} col-2">{{ nextProp.num }}</div>
</div>
</div>
</a>
<div><h5 class="lot-realisation"><span class="lot-prix">{% if nextProp.prop.lot.prix is not empty %}{{ nextProp.prop.lot.prix|number_format(0, ',', ' ') }}€ </span><span class="text-white">-</span>{% endif %}<span class="lot-livraison"> {% if nextProp.prop.lot.livraison is not empty %}{{ nextProp.prop.lot.Livraison }}{% endif %}</span></h5></div>
</div>
</div>
</div>
</div>
<a class="owl-next-proposition" href="{{ path('public_lot', {token: nextProp.prop.prospect.token, id: nextProp.prop.lot.id}) }}"></a>
</div>
{% endif %}
</div>
<div class="tooltip-next" style="display:none !important;">
Étape suivante
<span class="triangle"></span>
</div>
</div>
</div>
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script type="text/javascript">
// patch owl loading
if(window.innerHeight > window.innerWidth){
window.location.href = '{{ path('public_prospect_short', {token: prospect.token}) }}';
document.querySelector('#main_loader').style.display = 'flex';
}
</script>
<script type="text/javascript">
function initMap() {
map = new google.maps.Map(document.getElementById("map"), {
center: new google.maps.LatLng({{ lot.latitude is not null ? lot.latitude : 45.899247 }}, {{ lot.longitude is not null ? lot.longitude : 6.129384 }}),
zoom: {{lot.programmeParent.zoomMap is not null ? lot.programmeParent.zoomMap : 14}},
fullscreenControl: true,
streetViewControl: false,
rotateControl: false,
scrollwheel: false,
mapTypeControl: false,
clickableIcons: false,
mapTypeId: '{{lot.programmeParent.typePlan is not null ? lot.programmeParent.typePlan : satellite }}'
});
document.getElementById('map_switch').onclick = function() {
if(map.mapTypeId == 'roadmap') {
document.getElementById('roadmap_logo').style.display = 'block';
document.getElementById('satellite_logo').style.display = 'none';
map.setMapTypeId("satellite");
} else {
document.getElementById('satellite_logo').style.display = 'block';
document.getElementById('roadmap_logo').style.display = 'none';
map.setMapTypeId("roadmap");
}
};
document.getElementById('map_minus').onclick = function() {
map.setZoom(map.getZoom() - 1);
};
document.getElementById('map_plus').onclick = function() {
map.setZoom(map.getZoom() + 1);
};
const infowindow = new google.maps.InfoWindow({
content: '<div id="infobox_content">{{ lot.programme }}</br>{{ lot.adresse }}</br>{{ lot.codePostal }} {{ lot.ville }}</div>',
});
{% if lot.latitude is not null and lot.longitude is not null %}
var marker = new google.maps.Marker({
position: new google.maps.LatLng({{ lot.latitude }}, {{ lot.longitude }}),
map: map,
icon: {
url: "{{ absolute_url(asset('build/images/marker.png')) }}",
scaledSize: new google.maps.Size(100, 100),
},
title: 'Votre programme'
});
infowindow.open({
anchor: marker,
map,
});
{% endif %}
}
</script>
{% endblock %}
{% block body %}
{{ parent() }}
<script src='https://unpkg.com/panzoom@9.4.0/dist/panzoom.min.js'></script>
<script
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDjoLfbKLLFbXm0rCgQQPfBbihIFj8_T1Q&callback=initMap&v=weekly"
async></script>
{% endblock %}
{% block footer %}
{% endblock %}