diff options
| author | ivar <i@oiee.no> | 2025-10-20 00:26:34 +0200 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2025-10-20 00:26:34 +0200 |
| commit | a1f0518d0cd123a791adde64f4f11bd8e44276c7 (patch) | |
| tree | 675a7dff8262eea877ec800ff1efe9b92f5d7e7d /ios/Hæ-appen/ClusterHit.swift | |
| download | what-a1f0518d0cd123a791adde64f4f11bd8e44276c7.tar.xz what-a1f0518d0cd123a791adde64f4f11bd8e44276c7.zip | |
Initial commit
Diffstat (limited to 'ios/Hæ-appen/ClusterHit.swift')
| -rw-r--r-- | ios/Hæ-appen/ClusterHit.swift | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ios/Hæ-appen/ClusterHit.swift b/ios/Hæ-appen/ClusterHit.swift new file mode 100644 index 0000000..ebab096 --- /dev/null +++ b/ios/Hæ-appen/ClusterHit.swift @@ -0,0 +1,18 @@ +// +// ClusterHit.swift +// Hæ-appen +// +// Created by Ivar Løvlie on 16/09/2025. +// +import GISTools +import WebKit + +struct ClusterHit : Decodable { } + +final class ClusterProvider { + func load(west:Int, south: Int, north: Int, east: Int) async throws -> [ClusterHit] { + let url = URL(string: "http://http://localhost:5281/places?w=\(west)&e=\(east)&s=\(south)&n=\(north)")! + let (data, _) = try await URLSession.shared.data(from: url) + return try JSONDecoder().decode([ClusterHit].self, from: data) + } +} |
