dorfylegends/backend/templates/worldMap.html
2022-05-10 18:29:17 +00:00

42 lines
No EOL
764 B
HTML

{{template "layout.html" .}}
{{define "title"}}Legends Browser{{end}}
{{define "content"}}
{{- if ne world.Name "" -}}
<h3>{{world.Name}} - {{world.Altname}}</h3>
{{- end }}
{{ if world.MapReady }}
<div id="map" style="width: 100%; height: 1000px"></div>
{{initMap}}
<script>L.control.layers(null, overlayMaps).addTo(map);</script>
{{- range .Landmasses }}
{{ addLandmass .Id }}
{{- end }}
{{- range .Regions }}
{{ addRegion .Id }}
{{- end }}
{{- range .Sites }}
{{ addSite .Id true }}
{{- end }}
{{- range .MountainPeaks }}
{{ addMountain .Id true }}
{{- end }}
{{- range .WorldConstructions }}
{{ addWorldConstruction .Id }}
{{- end }}
{{- range $id, $r := .Rivers }}
{{ addRiver $id }}
{{- end }}
{{ else }}
No map data available
{{- end }}
{{- end }}