Files
MapLibreParticleLab/platform/darwin/include/MGLTilePyramidOfflineRegion.h
Minh Nguyễn 8824237e2d [ios, osx] Documented offline APIs
Also categorized offline symbols for jazzy and moved styleURL from MGLOfflineRegion to MGLTilePyramidOfflineRegion, since you never know if there will be a region type not constrained by a style in the future.
2016-03-10 17:08:58 -08:00

78 lines
2.9 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#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>
/**
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, a Mapbox URL indicating the style’s
map ID (`mapbox://styles/{user}/{style}`), or a path to a local file
relative to the application’s resource path.
*/
@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, a Mapbox URL indicating the style’s map ID
(`mapbox://styles/{user}/{style}`), or a path to a local file relative to
the application’s resource path. Specify `nil` for the default 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