mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-08-14 16:37:33 +00:00
Fix ZLOTA location lookup
This commit is contained in:
@@ -22,16 +22,16 @@ class ZLOTA(FileDownloadSIGRefDataProvider):
|
||||
if isinstance(data, list):
|
||||
for ref in data:
|
||||
ref_id = ref["code"]
|
||||
latitude = ref["y"]
|
||||
longitude = ref["x"]
|
||||
latitude = ref["latitude"]
|
||||
longitude = ref["longitude"]
|
||||
|
||||
ref = SIGRef(sig=self.SIG, id=ref_id, name=ref["name"],
|
||||
new_ref = SIGRef(sig=self.SIG, id=ref_id, name=ref["name"],
|
||||
url="https://ontheair.nz/assets/" + ref_id.replace("/", "_"),
|
||||
latitude=latitude,
|
||||
longitude=longitude)
|
||||
if latitude and longitude:
|
||||
ref.grid = latlong_to_locator(latitude, longitude, 6)
|
||||
new_data.append(ref)
|
||||
ref.new_ref = latlong_to_locator(latitude, longitude, 6)
|
||||
new_data.append(new_ref)
|
||||
|
||||
# Bail out if a stop has been requested, i.e. the program is shutting down - no need to parse the rest
|
||||
# of the data in this case
|
||||
|
||||
Reference in New Issue
Block a user