templates/network/profile/widgets/profile_widget_map.html.twig line 1

Open in your IDE?
  1. {% embed 'network/widget/widget.html.twig' %}
  2.   {% block content %}
  3.     {% if
  4.       profile.geolocation
  5.         and (profile.profileType == 'company'
  6.           or (user is defined and user.id is defined and user.id == profile.id)) %}
  7.       <div class="aspect-w-16 aspect-h-9 lg:aspect-w-1 lg:aspect-h-1"
  8.         data-controller="leaflet"
  9.         data-leaflet-options-value="{{ {
  10.           center: [profile.geolocation.latitude, profile.geolocation.longitude],
  11.           zoom: 12
  12.         }|json_encode }}"
  13.         data-leaflet-marker-value="{{ [
  14.           {
  15.             geolocation: [profile.geolocation.latitude, profile.geolocation.longitude],
  16.             color: profile.color.hex,
  17.             title: profile.name,
  18.             text: profile.street ~ '&nbsp;' ~ profile.housenumber ~ '<br>' ~ profile.postalCode
  19.               ~ ' '
  20.               ~ profile.city
  21.               ~ '<br>'
  22.               ~ (profile.country|country_name)
  23.           }
  24.         ]|json_encode }}">
  25.         <template data-leaflet-target="markerTemplate">
  26.           <b>%title%</b><br />
  27.           <span>%text%</span><br />
  28.         </template>
  29.         <div class="w-full h-full map" data-leaflet-target="map"></div>
  30.       </div>
  31.     {% endif %}
  32.   {% endblock %}
  33. {% endembed %}