diff options
author | Fabian Guerra <fabian.guerra@mapbox.com> | 2018-04-23 10:44:02 -0400 |
---|---|---|
committer | Fabian Guerra <fabian.guerra@mapbox.com> | 2018-04-23 10:44:02 -0400 |
commit | e08b6fe87f5824ab05a4cc67d9a76af5bb5ddd3b (patch) | |
tree | 886e10260bfa044f62943186ec837b9ccd02934c /platform/darwin/src/MGLComputedShapeSource.h | |
parent | 2bb785dad2489d04db179fa9cf65514640db0a96 (diff) | |
parent | a45670cfb5752866b9c8130024a313944684c2db (diff) | |
download | qtlocation-mapboxgl-upstream/fabian-merge-v4.0.0.tar.gz |
Merge branch 'release-boba' into masterupstream/fabian-merge-v4.0.0
# Conflicts:
# circle.yml
# include/mbgl/style/expression/let.hpp
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/LatLngBounds.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapKeyListener.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Transform.java
# platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/geometry/LatLngBoundsTest.java
# platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml
# platform/android/gradle/dependencies.gradle
# platform/android/src/example_custom_layer.cpp
# platform/android/src/geojson/point.cpp
# platform/darwin/src/NSPredicate+MGLAdditions.mm
# platform/darwin/test/MGLExpressionTests.mm
# platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec
# platform/ios/Mapbox-iOS-SDK-symbols.podspec
# platform/ios/Mapbox-iOS-SDK.podspec
# platform/ios/app/MBXViewController.m
# src/mbgl/renderer/layers/render_custom_layer.cpp
# src/mbgl/style/conversion/filter.cpp
# src/mbgl/style/expression/interpolate.cpp
# src/mbgl/style/expression/value.cpp
# test/style/filter.test.cpp
Diffstat (limited to 'platform/darwin/src/MGLComputedShapeSource.h')
-rw-r--r-- | platform/darwin/src/MGLComputedShapeSource.h | 70 |
1 files changed, 61 insertions, 9 deletions
diff --git a/platform/darwin/src/MGLComputedShapeSource.h b/platform/darwin/src/MGLComputedShapeSource.h index f90f2c94b1..068c49245c 100644 --- a/platform/darwin/src/MGLComputedShapeSource.h +++ b/platform/darwin/src/MGLComputedShapeSource.h @@ -1,15 +1,38 @@ -#import "MGLAbstractShapeSource.h" - #import "MGLFoundation.h" #import "MGLGeometry.h" #import "MGLTypes.h" -#import "MGLShape.h" +#import "MGLShapeSource.h" NS_ASSUME_NONNULL_BEGIN @protocol MGLFeature; /** + An `NSNumber` object containing a Boolean value; specifies whether the shape of + an `MGLComputedShapeSource` should be wrapped to accomodate coordinates with + longitudes beyond −180 and 180. The default value is `NO`. + + Setting this option to `YES` affects rendering performance. + + This option is used with the `MGLComputedShapeSource` class; it is ignored when + creating an `MGLShapeSource` object. + */ +extern MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionWrapsCoordinates; + +/** + An `NSNumber` object containing a Boolean value; specifies whether the shape of + an `MGLComputedShapeSource` should be clipped at the edge of each tile. The + default value is `NO`. + + Setting this option to `YES` affects rendering performance. Use this option to + clip `MGLPolyline`s and `MGLPolygon`s at tile boundaries without artifacts. + + This option is used with the `MGLComputedShapeSource` class; it is ignored when + creating an `MGLShapeSource` object. + */ +extern MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionClipsCoordinates; + +/** Data source for `MGLComputedShapeSource`. This protocol defines two optional methods for fetching data, one based on tile coordinates, and one based on a bounding box. Classes that implement this protocol must implement one, and only one of the methods. Methods on this protocol will not be @@ -38,21 +61,42 @@ NS_ASSUME_NONNULL_BEGIN @end /** - A source for vector data that is fetched one tile at a time. Useful for sources that are - too large to fit in memory, or are already divided into tiles, but not in Mapbox Vector Tile format. + `MGLComputedShapeSource` is a map content source that supplies vector shapes, + one tile at a time, to be shown on the map on demand. You implement a class + conforming to the `MGLComputedShapeSourceDataSource` protocol that returns + instances of `MGLShape` or `MGLFeature`, then add a computed shape source to an + `MGLStyle` object along with an `MGLVectorStyleLayer` object. The vector style + layer defines the appearance of any content supplied by the computed shape + source. - Supported options are `MGLShapeSourceOptionMinimumZoomLevel`, `MGLShapeSourceOptionMaximumZoomLevel`, - `MGLShapeSourceOptionBuffer`, and `MGLShapeSourceOptionSimplificationTolerance.` This source does - not support clustering. + `MGLComputedShapeSource` is similar to `MGLShapeSource` but is optimized for + data sets that change dynamically or are too large to fit completely in memory. + It is also useful for data that is divided into tiles in a format other than + <a href="https://www.mapbox.com/vector-tiles/">Mapbox Vector Tiles</a>. For + <a href="http://geojson.org/">GeoJSON</a> data, use the `MGLShapeSource` class. + For static tiles or Mapbox Vector Tiles, use the `MGLVectorTileSource` class. + + You can add and remove sources dynamically using methods such as + `-[MGLStyle addSource:]` and `-[MGLStyle sourceWithIdentifier:]`. This class + cannot be represented in a style JSON file; you must add it ot the style at + runtime. */ MGL_EXPORT -@interface MGLComputedShapeSource : MGLAbstractShapeSource +@interface MGLComputedShapeSource : MGLSource /** Returns a custom shape data source initialized with an identifier, and a dictionary of options for the source according to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources-geojson">style specification</a>. + + This class supports the following options: + `MGLShapeSourceOptionMinimumZoomLevel`, `MGLShapeSourceOptionMaximumZoomLevel`, + `MGLShapeSourceOptionBuffer`, + `MGLShapeSourceOptionSimplificationTolerance`, + `MGLShapeSourceOptionWrapsCoordinates`, and + `MGLShapeSourceOptionClipsCoordinates`. Shapes provided by a computed + shape source cannot be clustered. @param identifier A string that uniquely identifies the source. @param options An `NSDictionary` of options for this source. @@ -64,6 +108,14 @@ MGL_EXPORT dictionary of options for the source according to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources-geojson">style specification</a>. + + This class supports the following options: + `MGLShapeSourceOptionMinimumZoomLevel`, `MGLShapeSourceOptionMaximumZoomLevel`, + `MGLShapeSourceOptionBuffer`, + `MGLShapeSourceOptionSimplificationTolerance`, + `MGLShapeSourceOptionWrapsCoordinates`, and + `MGLShapeSourceOptionClipsCoordinates`. Shapes provided by a computed shape + source cannot be clustered. @param identifier A string that uniquely identifies the source. @param options An `NSDictionary` of options for this source. |