diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-01-26 18:52:44 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-01-27 11:44:16 +0100 |
commit | 62ea1f21858c69f6921c775ba7a3de201f0514d8 (patch) | |
tree | 7a4da88706e8a5513e1e13e993b2acc212cae3b1 /platform/darwin/src/MGLFeature.h | |
parent | a662508ddde4043ece36d8ea9b424368891d892c (diff) | |
download | qtlocation-mapboxgl-62ea1f21858c69f6921c775ba7a3de201f0514d8.tar.gz |
[core] remove trailing whitespace, add trailing newlines, add space after //
Diffstat (limited to 'platform/darwin/src/MGLFeature.h')
-rw-r--r-- | platform/darwin/src/MGLFeature.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/platform/darwin/src/MGLFeature.h b/platform/darwin/src/MGLFeature.h index 82dbb450cf..8ba5687480 100644 --- a/platform/darwin/src/MGLFeature.h +++ b/platform/darwin/src/MGLFeature.h @@ -14,14 +14,14 @@ NS_ASSUME_NONNULL_BEGIN contained in an `MGLShapeSource` or `MGLVectorSource` object. Each concrete subclass of `MGLShape` in turn has a subclass that conforms to this protocol. A feature object associates a shape with an optional identifier and attributes. - + You can add custom data to display on the map by creating feature objects and adding them to an `MGLShapeSource` using the `-[MGLShapeSource initWithIdentifier:shape:options:]` method or `MGLShapeSource.shape` property. Similarly, you can add `MGLPointFeature`, `MGLPolylineFeature`, and `MGLPolygonFeature` objects to the map as annotations using `-[MGLMapView addAnnotations:]` and related methods. - + In addition to adding data to the map, you can also extract data from the map: `-[MGLMapView visibleFeaturesAtPoint:]` and related methods return feature objects that correspond to features in the source. This enables you to inspect @@ -33,12 +33,12 @@ NS_ASSUME_NONNULL_BEGIN /** An object that uniquely identifies the feature in its containing content source. - + You can configure an `MGLVectorStyleLayer` object to include or exclude a specific feature in an `MGLShapeSource` or `MGLVectorSource`. In the `MGLVectorStyleLayer.predicate` property, compare the special `$id` attribute to the feature’s identifier. - + In vector tiles loaded by `MGLVectorSource` objects, the identifier corresponds to the <a href="https://github.com/mapbox/vector-tile-spec/tree/master/2.1#42-features">feature identifier</a> @@ -46,7 +46,7 @@ NS_ASSUME_NONNULL_BEGIN this property is `nil`. If specified, the identifier may be an integer, floating-point number, or string. These data types are mapped to instances of the following Foundation classes: - + <table> <thead> <tr><th>In the tile source</th><th>This property</th></tr> @@ -57,12 +57,12 @@ NS_ASSUME_NONNULL_BEGIN <tr><td>String</td> <td><code>NSString</code></td></tr> </tbody> </table> - + For details about the identifiers used in most Mapbox-provided styles, consult the <a href="https://www.mapbox.com/vector-tiles/mapbox-streets/">Mapbox Streets</a> layer reference. - + The identifier should be set before adding the feature to an `MGLShapeSource` object; setting it afterwards has no effect on the map’s contents. While it is possible to change this value on feature instances obtained from @@ -73,7 +73,7 @@ NS_ASSUME_NONNULL_BEGIN /** A dictionary of attributes for this feature. - + You can configure an `MGLVectorStyleLayer` object to include or exclude a specific feature in an `MGLShapeSource` or `MGLVectorSource`. In the `MGLVectorStyleLayer.predicate` property, compare a key of the attribute @@ -82,20 +82,20 @@ NS_ASSUME_NONNULL_BEGIN a value above 50 to the important features’ `importance` attribute, then set `MGLVectorStyleLayer.predicate` to an `NSPredicate` with the format `importance > 50`. - + You can also configure some attributes of an `MGLSymbolStyleLayer` object to include the value of an attribute in this dictionary whenever it renders this feature. For example, to label features in an `MGLShapeSource` object by their names, you can assign a `name` attribute to each of the source’s features, then set `MGLSymbolStyleLayer.textField` to an `MGLStyleValue` object containing the string `{name}`. - + In vector tiles loaded by `MGLVectorSource` objects, the keys and values of each feature’s attribute dictionary are determined by the source. Each attribute name is a string, while each attribute value may be a null value, Boolean value, integer, floating-point number, or string. These data types are mapped to instances of the following Foundation classes: - + <table> <thead> <tr><th>In the tile source</th><th>In this dictionary</th></tr> @@ -108,14 +108,14 @@ NS_ASSUME_NONNULL_BEGIN <tr><td>String</td> <td><code>NSString</code></td></tr> </tbody> </table> - + For details about the attribute names and values found in Mapbox-provided vector tile sources, consult the <a href="https://www.mapbox.com/vector-tiles/mapbox-streets/">Mapbox Streets</a> and <a href="https://www.mapbox.com/vector-tiles/mapbox-terrain/">Mapbox Terrain</a> layer references. - + Note that while it is possible to change this value on feature instances obtained from `-[MGLMapView visibleFeaturesAtPoint:]` and related methods, there will be no effect on the map. Setting this value can be useful @@ -126,7 +126,7 @@ NS_ASSUME_NONNULL_BEGIN /** Returns the feature attribute for the given attribute name. - + See the `attributes` property’s documentation for details on keys and values associated with this method. */ @@ -135,10 +135,10 @@ NS_ASSUME_NONNULL_BEGIN /** Returns a dictionary that can be serialized as a GeoJSON Feature representation of an instance of an `MGLFeature` subclass. - - The dictionary includes a `geometry` key corresponding to the receiver’s - underlying geometry data, a `properties` key corresponding to the receiver’s - `attributes` property, and an `id` key corresponding to the receiver’s + + The dictionary includes a `geometry` key corresponding to the receiver’s + underlying geometry data, a `properties` key corresponding to the receiver’s + `attributes` property, and an `id` key corresponding to the receiver’s `identifier` property. */ - (NS_DICTIONARY_OF(NSString *, id) *)geoJSONDictionary; @@ -156,7 +156,7 @@ MGL_EXPORT /** An `MGLPolylineFeature` object associates a polyline shape with an optional identifier and attributes. - + A polyline feature is known as a <a href="https://tools.ietf.org/html/rfc7946#section-3.1.4">LineString</a> feature in GeoJSON. @@ -176,7 +176,7 @@ MGL_EXPORT /** An `MGLPointCollectionFeature` object associates a point collection with an optional identifier and attributes. - + A point collection feature is known as a <a href="https://tools.ietf.org/html/rfc7946#section-3.1.3">MultiPoint</a> feature in GeoJSON. @@ -191,7 +191,7 @@ MGL_EXPORT /** An `MGLMultiPolylineFeature` object associates a multipolyline shape with an optional identifier and attributes. - + A multipolyline feature is known as a <a href="https://tools.ietf.org/html/rfc7946#section-3.1.5">MultiLineString</a> feature in GeoJSON. @@ -211,7 +211,7 @@ MGL_EXPORT /** An `MGLShapeCollectionFeature` object associates a shape collection with an optional identifier and attributes. - + A shape collection feature is known as a <a href="https://tools.ietf.org/html/rfc7946#section-3.3">feature collection</a> in GeoJSON. |