summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/entrance.kml10
-rw-r--r--templates/entrance_html.kml55
-rw-r--r--templates/expo.kml113
3 files changed, 107 insertions, 71 deletions
diff --git a/templates/entrance.kml b/templates/entrance.kml
new file mode 100644
index 0000000..77bb014
--- /dev/null
+++ b/templates/entrance.kml
@@ -0,0 +1,10 @@
+ {% if entrance.latlong %}
+ <Placemark>
+ <name>{{ entrance.slug }}</name>
+ <description><![CDATA[{{ html }}]]></description>
+ <styleUrl>#{{ size }}_cave</styleUrl>
+ <Point>
+ <coordinates>{{ entrance.latlong.1 }},{{ entrance.latlong.0 }},0</coordinates>
+ </Point>
+ </Placemark>
+ {% endif %}
diff --git a/templates/entrance_html.kml b/templates/entrance_html.kml
new file mode 100644
index 0000000..b45b11b
--- /dev/null
+++ b/templates/entrance_html.kml
@@ -0,0 +1,55 @@
+<dl>
+ <a href="{{entrance.cavelist.0.url }}">Cave: {{entrance.cavelist.0.name }}</a>
+ {% if entrance.marking %}
+ <dt>Marking</dt><dd>{{ entrance.marking_val|safe }}</dd>
+ {% endif %}
+ {% if entrance.marking_comment %}
+ <dt>Marking Comment</dt><dd>{{ entrance.marking_comment|safe }}</dd>
+ {% endif %}
+ {% if entrance.findability %}
+ <dt>Findability</dt><dd>{{ entrance.findability_val|safe }}</dd>
+ {% endif %}
+ {% if entrance.findability_comment %}
+ <dt>Findability Comment</dt><dd>{{ entrance.findability_comment|safe }}</dd>
+ {% endif %}
+ {% if entrance.location_description %}
+ <dt>Location</dt><dd>{{ entrance.location_description|safe }}</dd>
+ {% endif %}
+ {% if entrance.approach %}
+ <dt>Approach</dt><dd>{{ entrance.approach|safe }}</dd>
+ {% endif %}
+ {% if entrance.map_description %}
+ <dt>Map</dt><dd>{{ entrance.map_description|safe }}</dd>
+ {% endif %}
+ {% if entrance.underground_description %}
+ <dt>Underground</dt><dd>{{ entrance.underground_description|safe }}</dd>
+ {% endif %}
+ {% if entrance.photo %}
+ <dt>Photo</dt><dd>{{ entrance.photo|safe }}</dd>
+ {% endif %}
+ {% if entrance.entrance_description %}
+ <dt>Description</dt><dd>{{ entrance.entrance_description|safe }}</dd>
+ {% endif %}
+ {% if entrance.explorers %}
+ <dt>Explorers</dt><dd>{{ entrance.explorers|safe }}</dd>
+ {% endif %}
+ {% if entrance.northing %}
+ <dt>Location</dt><dd>?BMN? Northing: {{ entrance.northing|safe }}, Easting: {{ entrance.easting|safe }}, {{ entrance.alt|safe }}m</dd>
+ {% endif %}
+ {% if entrance.tag_station %}
+ <dt>Tag Location</dt><dd>{{ entrance.tag_station }} {{ entrance.tag.latlong.0|floatformat:5 }}N {{ entrance.tag.latlong.1|floatformat:5 }}E - UTM33 {{ entrance.tag.y|floatformat:0 }}, {{ entrance.tag.x|floatformat:0 }}, {{ entrance.tag.z|floatformat:0 }}m</dd>
+ {% endif %}
+ {% if entrance.bearings %}
+ <dt>Bearings</dt><dd>{{ entrance.bearings|safe }}</dd>
+ {% endif %}
+ {% if entrance.exact_station %}
+ <dt>Exact Station</dt><dd>{{ entrance.exact_station|safe }} {{ entrance.exact_location.latlong.0|floatformat:5 }}N {{ entrance.exact_location.latlong.1|floatformat:5 }}E - UTM33 {{ entrance.exact_location.y|floatformat:0 }}, {{ entrance.exact_location.x|floatformat:0 }}, {{ entrance.exact_location.z|floatformat:0 }}m</dd>
+ {% endif %}
+ {% if entrance.other_station %}
+ <dt>Other Station</dt><dd>{{ entrance.other_station|safe }}
+ {% if entrance.other_description %}
+ - {{ entrance.other_description|safe }}
+ {% endif %} {{ entrance.other_location.latlong.0|floatformat:5 }}N {{ entrance.other_location.latlong.1|floatformat:5 }}E - UTM33 {{ entrance.other_location.y|floatformat:0 }}, {{ entrance.other_location.x|floatformat:0 }}, {{ entrance.other_location.z|floatformat:0 }}m
+ </dd>
+ {% endif %}
+</dl>
diff --git a/templates/expo.kml b/templates/expo.kml
index 9179ee9..3861276 100644
--- a/templates/expo.kml
+++ b/templates/expo.kml
@@ -2,104 +2,75 @@
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>Expo.KML</name>
- <Style id="default0">
+ <Style id="small_cave_">
<IconStyle>
+ <scale>1.0</scale>
+ <Icon>
+ <href>icons/small_cave.png</href>
+ </Icon>
+ </IconStyle>
+ <LabelStyle>
+ <scale>0.7</scale>
+ </LabelStyle>
+ </Style>
+ <Style id="small_cave_hl">
+ <IconStyle>
+ <scale>2.0</scale>
+ <Icon>
+ <href>icons/small_cave.png</href>
+ </Icon>
+ </IconStyle>
+ <LabelStyle>
<scale>0.7</scale>
+ </LabelStyle>
+ </Style>
+ <StyleMap id="small_cave">
+ <Pair>
+ <key>normal</key>
+ <styleUrl>#small_cave_</styleUrl>
+ </Pair>
+ <Pair>
+ <key>highlight</key>
+ <styleUrl>#small_cave_hl</styleUrl>
+ </Pair>
+ </StyleMap>
+
+ <Style id="large_cave_">
+ <IconStyle>
+ <scale>1.0</scale>
<Icon>
- <href>http://maps.google.com/mapfiles/kml/shapes/placemark_circle.png</href>
+ <href>icons/large_cave.png</href>
</Icon>
</IconStyle>
<LabelStyle>
<scale>0.7</scale>
</LabelStyle>
</Style>
- <Style id="hl">
+ <Style id="large_cave_hl">
<IconStyle>
- <scale>0.84</scale>
+ <scale>2.0</scale>
<Icon>
- <href>http://maps.google.com/mapfiles/kml/shapes/placemark_circle_highlight.png</href>
+ <href>icons/large_cave.png</href>
</Icon>
</IconStyle>
<LabelStyle>
<scale>0.7</scale>
</LabelStyle>
</Style>
- <StyleMap id="default">
+ <StyleMap id="large_cave">
<Pair>
<key>normal</key>
- <styleUrl>#default0</styleUrl>
+ <styleUrl>#large_cave_</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
- <styleUrl>#hl</styleUrl>
+ <styleUrl>#large_cave_hl</styleUrl>
</Pair>
</StyleMap>
<Folder>
<name>Expo.KML</name>
{% for entrance in entrances %}
- {% if entrance.latlong %}
- <Placemark>
- <name>{{ entrance.slug }}</name>
- <description><![CDATA[ <dl>
- {% if entrance.marking %}
- <dt>Marking</dt><dd>{{ entrance.marking_val|safe }}</dd>
- {% endif %}
- {% if entrance.marking_comment %}
- <dt>Marking Comment</dt><dd>{{ entrance.marking_comment|safe }}</dd>
- {% endif %}
- {% if entrance.findability %}
- <dt>Findability</dt><dd>{{ entrance.findability_val|safe }}</dd>
- {% endif %}
- {% if entrance.findability_comment %}
- <dt>Findability Comment</dt><dd>{{ entrance.findability_comment|safe }}</dd>
- {% endif %}
- {% if entrance.location_description %}
- <dt>Location</dt><dd>{{ entrance.location_description|safe }}</dd>
- {% endif %}
- {% if entrance.approach %}
- <dt>Approach</dt><dd>{{ entrance.approach|safe }}</dd>
- {% endif %}
- {% if entrance.map_description %}
- <dt>Map</dt><dd>{{ entrance.map_description|safe }}</dd>
- {% endif %}
- {% if entrance.underground_description %}
- <dt>Underground</dt><dd>{{ entrance.underground_description|safe }}</dd>
- {% endif %}
- {% if entrance.photo %}
- <dt>Photo</dt><dd>{{ entrance.photo|safe }}</dd>
- {% endif %}
- {% if entrance.entrance_description %}
- <dt>Description</dt><dd>{{ entrance.entrance_description|safe }}</dd>
- {% endif %}
- {% if entrance.explorers %}
- <dt>Explorers</dt><dd>{{ entrance.explorers|safe }}</dd>
- {% endif %}
- {% if entrance.northing %}
- <dt>Location</dt><dd>?BMN? Northing: {{ entrance.northing|safe }}, Easting: {{ entrance.easting|safe }}, {{ entrance.alt|safe }}m</dd>
- {% endif %}
- {% if entrance.tag_station %}
- <dt>Tag Location</dt><dd>{{ entrance.tag_station }} UTM33 {{ entrance.tag.y|floatformat:0 }}, {{ entrance.tag.x|floatformat:0 }}, {{ entrance.tag.z|floatformat:0 }}m</dd>
- {% endif %}
- {% if entrance.bearings %}
- <dt>Bearings</dt><dd>{{ entrance.bearings|safe }}</dd>
- {% endif %}
- {% if entrance.exact_station %}
- <dt>Exact Station</dt><dd>{{ entrance.exact_station|safe }} UTM33 {{ entrance.exact_location.y|floatformat:0 }}, {{ entrance.exact_location.x|floatformat:0 }}, {{ entrance.exact_location.z|floatformat:0 }}m</dd>
- {% endif %}
- {% if entrance.other_station %}
- <dt>Other Station</dt><dd>{{ entrance.other_station|safe }}
- {% if entrance.other_description %}
- - {{ entrance.other_description|safe }}
- {% endif %} UTM33 {{ entrance.other_location.y|floatformat:0 }}, {{ entrance.other_location.x|floatformat:0 }}, {{ entrance.other_location.z|floatformat:0 }}m
- </dd>
- {% endif %}
- </dl> ]]></description>
- <styleUrl>#default</styleUrl>
- <Point>
- <coordinates>{{ entrance.latlong.1 }},{{ entrance.latlong.0 }},0</coordinates>
- </Point>
- </Placemark>
- {% endif %}
+ {{ entrance }}
{% endfor %}
</Folder>
</Document>