Skip to content

Commit 05aebd5

Browse files
committed
Settings done
Settings done
1 parent b106004 commit 05aebd5

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

GoInfoGame/GoInfoGame/AppQuestManager.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ class AppQuestManager {
3434
// Get the data from bbox
3535
let centralLocation = CLLocation(latitude: 37.7749, longitude: -122.4194) // San Francisco coords
3636
let distance = 100
37+
//37.41465820658871,-122.0912196996173,37.42366839341129,-122.0799229003827
3738
let boundingCoordinates = centralLocation.boundingCoordinates(distance: CLLocationDistance(distance))
38-
osmConnection.fetchMapData(left:boundingCoordinates.left.coordinate.longitude , bottom:boundingCoordinates.bottom.coordinate.latitude , right:boundingCoordinates.right.coordinate.longitude , top:boundingCoordinates.top.coordinate.latitude ) { result in
39+
40+
osmConnection.fetchMapData(left:bbox.minLon , bottom:bbox.minLat , right:bbox.maxLon , top:bbox.maxLat ) { result in
3941
switch result {
4042
case .success(let mapData):
4143
let response = Array(mapData.values)

GoInfoGame/osmapi/OSMConnection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public class OSMConnection {
168168

169169
/// Internal function for getting the map data
170170
public func getOSMMapData(left: Double, bottom: Double, right: Double, top: Double,_ completion: @escaping (Result<OSMMapDataResponse, Error>)-> Void) {
171-
let urlString = "https://api.openstreetmap.org/api/0.6/map.json?bbox=\(left),\(bottom),\(right),\(top)"
171+
let urlString = self.baseUrl.appending("map.json?bbox=\(left),\(bottom),\(right),\(top)")
172172
print(urlString)
173173
guard let url = URL(string: urlString) else {
174174
print("Invalid URL given")

GoInfoGame/osmapi/models/OSMMapData.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public struct Element: Codable {
8787
public struct Member: Codable {
8888
public let type: TypeEnum
8989
public let ref: Int
90-
public let role: Role
90+
public let role: String
9191
}
9292

9393
public enum Role: String, Codable {

0 commit comments

Comments
 (0)