templates/modules/map/map.twig line 1

Open in your IDE?
  1. {% set medium = medium ?: false %}
  2. {% set img = img ?: false %}
  3. {% set dataResult = data ? data.markers|json_encode : false %}
  4. {% set notInteractive = notInteractive ?: false %}
  5. <div id="curMap" class="curMap map {{ medium ? "map_medium" }} {{ notInteractive ? "curMap_notInteractive" }}" style=".leaflet-marker-icon{width: 50px !important; height: 50px !important; background: no-repeat url({{img}}) center/100%}" data-result="{{dataResult}}"></div>
  6. {% if fetch_nearby is defined and fetch_nearby == true %}
  7.     
  8.     <div data-lat="{{ map.markers|first['lat'] }}" data-lng="{{ map.markers|first['lon'] }}" data-cachefile="{{ cachefile }}">
  9.         <br>
  10.         {% if parkings is defined and parkings is not empty %}
  11.             <div class="wrapper-cards cardsCenters cardsCenters_padding {{ parkings|trim ? '' : 'hide'}}">
  12.                 {{ parkings|raw }}
  13.             </div>
  14.         {% else %}
  15.             <div class="wrapper-cards cardsCenters cardsCenters_padding hide" id="nearby_parking"></div>
  16.         {% endif %}
  17.         <br>
  18.         <div class="wrapper-cards cardsCenters cardsCenters_padding {{ buses|trim or subways|trim ? '' : 'hide'}}" id="nearby_transport">
  19.             <h2 class="headerTitleAndLink-group-title {{ buses|trim or subways|trim or trams|trim ? '' : 'hide'}}">Moyens de transport</h2>
  20.             {% if buses is defined and buses is not empty %}
  21.                 {{ buses|raw }}
  22.             {% else %}
  23.                 <div id="buses"></div>
  24.             {% endif %}
  25.             {% if subways is defined and subways is not empty %}
  26.                 {{ subways|raw }}
  27.             {% else %}
  28.                 <div id="subways"></div>
  29.             {% endif %}
  30.             {% if trams is defined and trams is not empty %}
  31.                 {{ trams|raw }}
  32.             {% else %}
  33.                 <div id="trams"></div>
  34.             {% endif %}
  35.         </div>
  36.         
  37.     </div>
  38. {% endif %}