silverstripe-elemental-basics/templates/Objects/Map.ss

29 lines
726 B
Scheme
Raw Normal View History

2021-06-19 20:27:51 +02:00
<div
2021-07-19 23:35:50 +02:00
class="js-mapapi mapAPI-map-container"
2021-06-19 20:27:51 +02:00
data-map-zoom="$MapZoom"
data-key="$MapAPIKey"
data-map-style="<% if $MapStyle %>$MapStyle.XML<% else %>$SiteConfig.MapStyle.XML<% end_if %>"
<% if $GeoJSON %>data-geojson="$GeoJSON.XML"<% end_if %>
<% if $ID %>
data-id="$ID"
<% end_if %>
<% if $MapIcon %>
data-icon="$Icon.XML"
<% end_if %>
<% if $MapTitle %>
data-content="$MapTitle.XML"
<% end_if %>
<% if $Lat && $Lng %>
data-lat="$Lat"
data-lng="$Lng"
<% else_if $FullAddress %>
data-address="$FullAddress.XML"
<% else_if $Address %>
data-address="$Address.XML"
<% end_if %>
data-fly-to-marker="true"
data-fly-to-bounds="false"
>
<div class="mapAPI-map"></div>
</div>