silverstripe-webpack/app/templates/Objects/Map.ss
2019-12-18 03:43:28 +07:00

27 lines
648 B
Scheme

<div
class="mapAPI-map-container"
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 $Address %>
data-address="$Address.XML"
<% end_if %>
data-fly-to-marker="true"
data-fly-to-bounds="false"
>
<div class="mapAPI-map"></div>
</div>