Skip to content

Commit 91e8116

Browse files
committed
Accessing WMTSLayers local file
1 parent 23273ac commit 91e8116

File tree

3 files changed

+107
-1
lines changed

3 files changed

+107
-1
lines changed

GoInfoGame/GoInfoGame.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
C71EB5B72E2100E30009E610 /* NetworkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C71EB5B22E2100E30009E610 /* NetworkManager.swift */; };
151151
C71EB5B82E2100E30009E610 /* NetworkMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = C71EB5B32E2100E30009E610 /* NetworkMonitor.swift */; };
152152
C71EB5B92E2100E30009E610 /* APIManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C71EB5B12E2100E30009E610 /* APIManager.swift */; };
153+
C71EB5BD2E2113500009E610 /* WMTSLayers.json in Resources */ = {isa = PBXBuildFile; fileRef = C71EB5BC2E2113500009E610 /* WMTSLayers.json */; };
153154
C75666D02E0D068900D36C41 /* OHHTTPStubs in Frameworks */ = {isa = PBXBuildFile; productRef = C75666CF2E0D068900D36C41 /* OHHTTPStubs */; };
154155
C75666D22E0D068900D36C41 /* OHHTTPStubsSwift in Frameworks */ = {isa = PBXBuildFile; productRef = C75666D12E0D068900D36C41 /* OHHTTPStubsSwift */; };
155156
C75CC5D92E0D22F4008A94A0 /* LongQuestsResponse.json in Resources */ = {isa = PBXBuildFile; fileRef = C75CC5D82E0D22F4008A94A0 /* LongQuestsResponse.json */; };
@@ -493,6 +494,7 @@
493494
C71EB5B22E2100E30009E610 /* NetworkManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkManager.swift; sourceTree = "<group>"; };
494495
C71EB5B32E2100E30009E610 /* NetworkMonitor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkMonitor.swift; sourceTree = "<group>"; };
495496
C71EB5B42E2100E30009E610 /* ResponseHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResponseHandler.swift; sourceTree = "<group>"; };
497+
C71EB5BC2E2113500009E610 /* WMTSLayers.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = WMTSLayers.json; sourceTree = "<group>"; };
496498
C75CC5D62E0D22F4008A94A0 /* Workspaces response.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "Workspaces response.json"; sourceTree = "<group>"; };
497499
C75CC5D72E0D22F4008A94A0 /* SCLIO Seattle pins response.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "SCLIO Seattle pins response.json"; sourceTree = "<group>"; };
498500
C75CC5D82E0D22F4008A94A0 /* LongQuestsResponse.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = LongQuestsResponse.json; sourceTree = "<group>"; };
@@ -1307,6 +1309,7 @@
13071309
C75CC5D52E0D22E0008A94A0 /* SampleResponses */ = {
13081310
isa = PBXGroup;
13091311
children = (
1312+
C71EB5BC2E2113500009E610 /* WMTSLayers.json */,
13101313
C75CC5D62E0D22F4008A94A0 /* Workspaces response.json */,
13111314
C75CC5D72E0D22F4008A94A0 /* SCLIO Seattle pins response.json */,
13121315
C75CC5D82E0D22F4008A94A0 /* LongQuestsResponse.json */,
@@ -1891,6 +1894,7 @@
18911894
files = (
18921895
973FC00A2B4D2A6D00878269 /* Localizable.strings in Resources */,
18931896
FAD5C4FF2AFCBE720040C61A /* LaunchScreen.storyboard in Resources */,
1897+
C71EB5BD2E2113500009E610 /* WMTSLayers.json in Resources */,
18941898
FAD5C4FC2AFCBE720040C61A /* Assets.xcassets in Resources */,
18951899
FAD5C4FA2AFCBE700040C61A /* Main.storyboard in Resources */,
18961900
C75CC5D92E0D22F4008A94A0 /* LongQuestsResponse.json in Resources */,
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
[
2+
{
3+
"attribution": {
4+
"required": true,
5+
"text": "Hexagon Imagery",
6+
"url": "https://hexagon.com/products/aerial-imagery"
7+
},
8+
"description": "Hexagon Imagery for Washington state in USA",
9+
"extent": {
10+
"max_zoom": 19,
11+
"polygon": [
12+
[
13+
[
14+
-124.84,
15+
48.99
16+
],
17+
[
18+
-124.78,
19+
47.46
20+
],
21+
[
22+
-124.7,
23+
47.15
24+
],
25+
[
26+
-124.47,
27+
46.95
28+
],
29+
[
30+
-124.15,
31+
46.75
32+
],
33+
[
34+
-124.05,
35+
46.28
36+
],
37+
[
38+
-124.05,
39+
45.94
40+
],
41+
[
42+
-122.4,
43+
45.94
44+
],
45+
[
46+
-122.3,
47+
46
48+
],
49+
[
50+
-121.5,
51+
45.67
52+
],
53+
[
54+
-120.5,
55+
45.7
56+
],
57+
[
58+
-119.9,
59+
46.05
60+
],
61+
[
62+
-118.99,
63+
46.28
64+
],
65+
[
66+
-117.03,
67+
46.34
68+
],
69+
[
70+
-117.04,
71+
47.76
72+
],
73+
[
74+
-117.05,
75+
49
76+
],
77+
[
78+
-118.7,
79+
49
80+
],
81+
[
82+
-120,
83+
49
84+
],
85+
[
86+
-122.76,
87+
49
88+
],
89+
[
90+
-124.84,
91+
48.99
92+
]
93+
]
94+
]
95+
},
96+
"icon": "https://ichs-p-001.sitecorecontenthub.cloud/api/public/content/a-s-s-e-t---3-9-4-2-4-39424?v=ba59b6e9",
97+
"id": "HX_IMG",
98+
"name": "Hexagon Imagery",
99+
"type": "wmts",
100+
"url": "https://waprovisoimg.centralindia.cloudapp.azure.com/streaming/wmts?/1.0.0/HxGN_Imagery/default/WebMercator/{z}/{y}/{x}.png"
101+
}
102+
]

GoInfoGame/GoInfoGame/UI/Map/MapRepository.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class MapRepository: MapRepositoryProtocol {
5555

5656
struct GetWMTSLayersReqeust: APIRequest {
5757
var urlRequest: URLRequest? {
58-
guard let url = URL(string: "https://mocki.io/v1/b6b2fc6b-5d13-42f7-a5a6-40c33bf6df1e") else {
58+
guard let url = Bundle.main.url(forResource: "WMTSLayers", withExtension: "json") else {
5959
return nil
6060
}
6161

0 commit comments

Comments
 (0)