diff options
author | Jesse Crocker <jesse@gaiagps.com> | 2017-09-08 14:01:03 -0700 |
---|---|---|
committer | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-11-22 13:56:38 -0800 |
commit | b2925e71acc272b4afe829149d4b87d59c1dad70 (patch) | |
tree | 538714dc1ad34bc36365e639d6db20a7033431f6 /platform/darwin/src/MGLAbstractShapeSource.h | |
parent | acae19386129056b9425b114b01f062feecd297e (diff) | |
download | qtlocation-mapboxgl-b2925e71acc272b4afe829149d4b87d59c1dad70.tar.gz |
[darwin] Abstract ShapeSource interface
Diffstat (limited to 'platform/darwin/src/MGLAbstractShapeSource.h')
-rw-r--r-- | platform/darwin/src/MGLAbstractShapeSource.h | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLAbstractShapeSource.h b/platform/darwin/src/MGLAbstractShapeSource.h new file mode 100644 index 0000000000..3b35986b3f --- /dev/null +++ b/platform/darwin/src/MGLAbstractShapeSource.h @@ -0,0 +1,99 @@ +#import "MGLSource.h" + +/** + Options for `MGLShapeSource` objects. + */ +typedef NSString *MGLShapeSourceOption NS_STRING_ENUM; + +/** + An `NSNumber` object containing a Boolean enabling or disabling clustering. + If the `shape` property contains point shapes, setting this option to + `YES` clusters the points by radius into groups. The default value is `NO`. + + This attribute corresponds to the + <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources-geojson-cluster"><code>cluster</code></a> + source property in the Mapbox Style Specification. + + This option only affects point features within a shape source. + */ +extern MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionClustered; + +/** + An `NSNumber` object containing an integer; specifies the radius of each + cluster if clustering is enabled. A value of 512 produces a radius equal to + the width of a tile. The default value is 50. + */ +extern MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionClusterRadius; + +/** + An `NSNumber` object containing an integer; specifies the maximum zoom level at + which to cluster points if clustering is enabled. Defaults to one zoom level + less than the value of `MGLShapeSourceOptionMaximumZoomLevel` so that, at the + maximum zoom level, the shapes are not clustered. + + This attribute corresponds to the + <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources-geojson-clusterMaxZoom"><code>clusterMaxZoom</code></a> + source property in the Mapbox Style Specification. + */ +extern MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionMaximumZoomLevelForClustering; + +/** + An `NSNumber` object containing an integer; specifies the minimum zoom level at + which to create vector tiles. The default value is 0. + + This attribute corresponds to the + <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources-geojson-minzoom"><code>minzoom</code></a> + source property in the Mapbox Style Specification. + */ +extern MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionMinimumZoomLevel; + +/** + An `NSNumber` object containing an integer; specifies the maximum zoom level at + which to create vector tiles. A greater value produces greater detail at high + zoom levels. The default value is 18. + + This attribute corresponds to the + <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources-geojson-maxzoom"><code>maxzoom</code></a> + source property in the Mapbox Style Specification. + */ +extern MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionMaximumZoomLevel; + +/** + An `NSNumber` object containing an integer; specifies the size of the tile + buffer on each side. A value of 0 produces no buffer. A value of 512 produces a + buffer as wide as the tile itself. Larger values produce fewer rendering + artifacts near tile edges and slower performance. The default value is 128. + + This attribute corresponds to the + <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources-geojson-buffer"><code>buffer</code></a> + source property in the Mapbox Style Specification. + */ +extern MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionBuffer; + +/** + An `NSNumber` object containing a double; specifies the Douglas-Peucker + simplification tolerance. A greater value produces simpler geometries and + improves performance. The default value is 0.375. + + This attribute corresponds to the + <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources-geojson-tolerance"><code>tolerance</code></a> + source property in the Mapbox Style Specification. + */ +extern MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionSimplificationTolerance; + +/** + `MGLAbstractShapeSource` is an abstract base class for map content sources that + supply vector shapes to be shown on the map. A shape source is added to an + `MGLStyle` object along with an `MGLVectorStyleLayer` object. The vector style + layer defines the appearance of any content supplied by the shape source. + + + Do not create instances of this class directly, and do not create your own + subclasses of this class. Instead, create instances of `MGLShapeSource` or + `MGLComputedShapeSource`. + */ +MGL_EXPORT +@interface MGLAbstractShapeSource : MGLSource + + +@end |