summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLTilePyramidOfflineRegion.h
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-04-23 10:35:59 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-04-23 10:35:59 -0700
commit3e22369f27ba4a0b1273c8934bfb0f59d9aa96c5 (patch)
tree9f0faeb5af456dc559b48d114883b2f6771400ba /platform/darwin/src/MGLTilePyramidOfflineRegion.h
parent2d32336a41dac77b6182642b7067a23add12eb09 (diff)
downloadqtlocation-mapboxgl-3e22369f27ba4a0b1273c8934bfb0f59d9aa96c5.tar.gz
[ios, osx] Eliminated platform/{ios,osx}/include
Also updated various project references to be group-relative, so Xcode chooses the right directory by default when adding a new file. Fixes #4770.
Diffstat (limited to 'platform/darwin/src/MGLTilePyramidOfflineRegion.h')
-rw-r--r--platform/darwin/src/MGLTilePyramidOfflineRegion.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLTilePyramidOfflineRegion.h b/platform/darwin/src/MGLTilePyramidOfflineRegion.h
new file mode 100644
index 0000000000..4e9f394e74
--- /dev/null
+++ b/platform/darwin/src/MGLTilePyramidOfflineRegion.h
@@ -0,0 +1,78 @@
+#import <Foundation/Foundation.h>
+
+#import "MGLOfflineRegion.h"
+#import "MGLGeometry.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ An offline region defined by a style URL, geographic coordinate bounds, and
+ range of zoom levels.
+ */
+@interface MGLTilePyramidOfflineRegion : NSObject <MGLOfflineRegion, NSSecureCoding, NSCopying>
+
+/**
+ URL of the style whose resources are required for offline viewing.
+
+ In addition to the JSON stylesheet, different styles may require different font
+ glyphs, sprite sheets, and other resources.
+
+ The URL may be a full HTTP or HTTPS URL or a Mapbox URL indicating the style’s
+ map ID (`mapbox://styles/{user}/{style}`).
+ */
+@property (nonatomic, readonly) NSURL *styleURL;
+
+/**
+ The coordinate bounds for the geographic region covered by the downloaded
+ tiles.
+ */
+@property (nonatomic, readonly) MGLCoordinateBounds bounds;
+
+/**
+ The minimum zoom level for which to download tiles and other resources.
+
+ For more information about zoom levels, `-[MGLMapView zoomLevel]`.
+ */
+@property (nonatomic, readonly) double minimumZoomLevel;
+
+/**
+ The maximum zoom level for which to download tiles and other resources.
+
+ For more information about zoom levels, `-[MGLMapView zoomLevel]`.
+ */
+@property (nonatomic, readonly) double maximumZoomLevel;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+/**
+ Initializes a newly created offline region with the given style URL, geographic
+ coordinate bounds, and range of zoom levels.
+
+ This is the designated initializer for `MGLTilePyramidOfflineRegion`.
+
+ @param styleURL URL of the map style for which to download resources. The URL
+ may be a full HTTP or HTTPS URL or a Mapbox URL indicating the style’s map
+ ID (`mapbox://styles/{user}/{style}`). Specify `nil` for the default style.
+ Relative file URLs cannot be used as offline style URLs. To download the
+ online resources required by a local style, specify a URL to an online copy
+ of the style.
+ @param bounds The coordinate bounds for the geographic region to be covered by
+ the downloaded tiles.
+ @param minimumZoomLevel The minimum zoom level to be covered by the downloaded
+ tiles. This parameter should be set to at least 0 but no greater than the
+ value of the `maximumZoomLevel` parameter. For each required tile source, if
+ this parameter is set to a value less than the tile source’s minimum zoom
+ level, the download covers zoom levels down to the tile source’s minimum
+ zoom level.
+ @param maximumZoomLevel The maximum zoom level to be covered by the downloaded
+ tiles. This parameter should be set to at least the value of the
+ `minimumZoomLevel` parameter. For each required tile source, if this
+ parameter is set to a value greater than the tile source’s minimum zoom
+ level, the download covers zoom levels up to the tile source’s maximum zoom
+ level.
+ */
+- (instancetype)initWithStyleURL:(nullable NSURL *)styleURL bounds:(MGLCoordinateBounds)bounds fromZoomLevel:(double)minimumZoomLevel toZoomLevel:(double)maximumZoomLevel NS_DESIGNATED_INITIALIZER;
+
+@end
+
+NS_ASSUME_NONNULL_END