@rnmapbox/maps 10.0.0-beta.67 → 10.0.0-beta.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -36,6 +36,10 @@ class RCTMGLOfflineModule: RCTEventEmitter {
|
|
|
36
36
|
return OfflineManager(resourceOptions: .init(accessToken: MGLModule.accessToken!))
|
|
37
37
|
}()
|
|
38
38
|
|
|
39
|
+
lazy var offlineRegionManager: OfflineRegionManager = {
|
|
40
|
+
return OfflineRegionManager(resourceOptions: .init(accessToken: MGLModule.accessToken!))
|
|
41
|
+
}()
|
|
42
|
+
|
|
39
43
|
lazy var tileStore : TileStore = {
|
|
40
44
|
return TileStore.default
|
|
41
45
|
}()
|
|
@@ -51,13 +55,13 @@ class RCTMGLOfflineModule: RCTEventEmitter {
|
|
|
51
55
|
if let styleURI = rnMetadata["styleURI"] as? String {
|
|
52
56
|
self.styleURI = StyleURI(rawValue: styleURI)
|
|
53
57
|
}
|
|
54
|
-
if let bounds = rnMetadata["bounds"] as?
|
|
58
|
+
if let bounds = rnMetadata["bounds"] as? [String:Any] {
|
|
55
59
|
self.bounds = logged("RCTMGLOfflineModule.TileRegionPack: cannot decode bounds") {
|
|
56
60
|
let jsonData = try JSONSerialization.data(withJSONObject: bounds)
|
|
57
61
|
return try JSONDecoder().decode(Geometry.self, from: jsonData)
|
|
58
62
|
}
|
|
59
63
|
}
|
|
60
|
-
if let zoomRange = rnMetadata["zoomRange"] as?
|
|
64
|
+
if let zoomRange = rnMetadata["zoomRange"] as? Any {
|
|
61
65
|
self.zoomRange = logged("RCTMGLOfflineModule.TileRegionPack: cannot decode zoomRange") {
|
|
62
66
|
let jsonData = try JSONSerialization.data(withJSONObject: zoomRange)
|
|
63
67
|
return try JSONDecoder().decode(ClosedRange<UInt8>.self, from: jsonData)
|
|
@@ -528,7 +532,7 @@ class RCTMGLOfflineModule: RCTEventEmitter {
|
|
|
528
532
|
|
|
529
533
|
@objc
|
|
530
534
|
func setTileCountLimit(_ limit: NSNumber) {
|
|
531
|
-
|
|
535
|
+
self.offlineRegionManager.setOfflineMapboxTileCountLimitForLimit(limit.uint64Value)
|
|
532
536
|
}
|
|
533
537
|
|
|
534
538
|
|