diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-12-20 12:41:40 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-12-20 12:41:40 -0800 |
commit | a6b1773a44d4ef086eb30967cb041cb64312650a (patch) | |
tree | ec293e38c9ec3ef1f32195f0d5071f73b88497ed /platform/darwin/src/MGLVectorSource.h | |
parent | dad57df38ef86363da9bff2e62f3fddc5688f0cf (diff) | |
parent | e2fde9cc4eff3de5ab2f513d0c24ad5471d147e6 (diff) | |
download | qtlocation-mapboxgl-a6b1773a44d4ef086eb30967cb041cb64312650a.tar.gz |
Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.5-master
Also reran make style-code and manually discarded anything related to fill extrusion layers.
Diffstat (limited to 'platform/darwin/src/MGLVectorSource.h')
-rw-r--r-- | platform/darwin/src/MGLVectorSource.h | 79 |
1 files changed, 23 insertions, 56 deletions
diff --git a/platform/darwin/src/MGLVectorSource.h b/platform/darwin/src/MGLVectorSource.h index 6cfab09489..f91a0cbb23 100644 --- a/platform/darwin/src/MGLVectorSource.h +++ b/platform/darwin/src/MGLVectorSource.h @@ -1,68 +1,35 @@ -#import "MGLSource.h" -#import "MGLTypes.h" - -@class MGLTileSet; +#import "MGLTileSource.h" NS_ASSUME_NONNULL_BEGIN /** - A vector tile source. Tiles must be in Mapbox Vector Tile format. - - @see <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources-vector">The - style specification.</a> - */ -@interface MGLVectorSource : MGLSource - -#pragma mark Initializing a Source - -/** - Returns a vector source initialized with an identifier and TileJSON URL. + `MGLVectorSource` is a map content source that supplies tiled vector data in + <a href="https://www.mapbox.com/vector-tiles/">Mapbox Vector Tile</a> format to + be shown on the map. The location of and metadata about the tiles are defined + either by an option dictionary or by an external file that conforms to the + <a href="https://github.com/mapbox/tilejson-spec/">TileJSON specification</a>. + A vector source is added to an `MGLStyle` object along with one or more + `MGLVectorStyleLayer` objects. A vector style layer defines the appearance of + any content supplied by the vector source. - After initializing and configuring the source, add it to a map view’s style - using the `-[MGLStyle addSource:]` method. + Each + <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources-vector"><code>vector</code></a> + source defined by the style JSON file is represented at runtime by an + `MGLVectorSource` object that you can use to initialize new style layers. You + can also add and remove sources dynamically using methods such as + `-[MGLStyle addSource:]` and `-[MGLStyle sourceWithIdentifier:]`. - @param identifier A string that uniquely identifies the source in the style to - which it is added. - @param url A URL to a TileJSON configuration file describing the source’s - contents and other metadata. - @return An initialized vector source. + Within each vector tile, each geometric coordinate must lie between + −1 × <var>extent</var> and + (<var>extent</var> × 2) − 1, inclusive. Any vector style + layer initialized with a vector source must have a non-`nil` value in its + `sourceLayerIdentifier` property. */ -- (instancetype)initWithIdentifier:(NSString *)identifier URL:(NSURL *)url NS_DESIGNATED_INITIALIZER; - -/** - Returns a vector source initialized an identifier and tile set. +@interface MGLVectorSource : MGLTileSource - After initializing and configuring the source, add it to a map view’s style - using the `-[MGLStyle addSource:]` method. - - @param identifier A string that uniquely identifies the source in the style to - which it is added. - @param tileSet A tile set describing the source’s contents and other metadata. - @return An initialized vector source. - */ -- (instancetype)initWithIdentifier:(NSString *)identifier tileSet:(MGLTileSet *)tileSet NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithIdentifier:(NSString *)identifier configurationURL:(NSURL *)configurationURL NS_DESIGNATED_INITIALIZER; -#pragma mark Accessing a Source’s Content - -/** - A URL to a TileJSON configuration file describing the source’s contents and - other metadata. - - The URL may be a full HTTP or HTTPS URL or a Mapbox URL indicating the tile - set’s map ID (`mapbox://<mapid>`). - - If the receiver was initialized using `-initWithIdentifier:tileSet:`, this - property is set to `nil`. - */ -@property (nonatomic, readonly, copy) NSURL *URL; - -/** - A tile set describing the source’s contents and other metadata. - - If the receiver was initialized using `-initWithIdentifier:URL:`, this property - is set to `nil`. - */ -@property (nonatomic, readonly, nullable) MGLTileSet *tileSet; +- (instancetype)initWithIdentifier:(NSString *)identifier tileURLTemplates:(NS_ARRAY_OF(NSString *) *)tileURLTemplates options:(nullable NS_DICTIONARY_OF(MGLTileSourceOption, id) *)options NS_DESIGNATED_INITIALIZER; @end |