kml file output for google earth etc

This commit is contained in:
Martin Green
2023-05-01 00:01:41 +01:00
parent 2ee63a9804
commit 896af43994
4 changed files with 89 additions and 1 deletions

View File

@@ -420,6 +420,26 @@ class Entrance(TroggleModel):
return cavelist[0].url_parent()
else:
return ""
def latlong(self):
station = None
if self.other_station:
try:
station = SurvexStation.objects.get(name = self.other_station)
except:
pass
if self.tag_station:
try:
station = SurvexStation.objects.get(name = self.tag_station)
except:
pass
if self.exact_station:
try:
station = SurvexStation.objects.get(name = self.exact_station)
except:
pass
if station:
return station.latlong()
def GetCaveLookup():