summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLMapView.h
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2017-03-13 17:45:37 -0700
committerMinh Nguyễn <mxn@1ec5.org>2017-03-14 14:42:57 -0700
commit4430e656036caa6e2d9523222f0c6c630200fa45 (patch)
tree5c3a9946c568a9a8c46696a2e3bffb4c4bade976 /platform/ios/src/MGLMapView.h
parent7a13bee72e7c31185219dc0e1fb97b80a155ca11 (diff)
downloadqtlocation-mapboxgl-4430e656036caa6e2d9523222f0c6c630200fa45.tar.gz
[ios, macos] Expanded feature querying documentation
Also fixed a couple incorrect Swift method names on macOS.
Diffstat (limited to 'platform/ios/src/MGLMapView.h')
-rw-r--r--platform/ios/src/MGLMapView.h76
1 files changed, 48 insertions, 28 deletions
diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h
index 063818dc6e..4872ff2448 100644
--- a/platform/ios/src/MGLMapView.h
+++ b/platform/ios/src/MGLMapView.h
@@ -1171,10 +1171,11 @@ IB_DESIGNABLE
Returns an array of rendered map features that intersect with a given point,
restricted to the given style layers.
- This method may return all features from the specified layers. To filter
- the returned features, use the
- `-visibleFeaturesAtPoint:inStyleLayersWithIdentifiers:predicate:` method. For more
- information about searching for map features, see that method’s documentation.
+ This method returns all the intersecting features from the specified layers. To
+ filter the returned features, use the
+ `-visibleFeaturesAtPoint:inStyleLayersWithIdentifiers:predicate:` method. For
+ more information about searching for map features, see that method’s
+ documentation.
@param point A point expressed in the map view’s coordinate system.
@param styleLayerIdentifiers A set of strings that correspond to the names
@@ -1187,17 +1188,17 @@ IB_DESIGNABLE
/**
Returns an array of rendered map features that intersect with a given point,
- restricted to the given style layers and filtered by the given
- predicate.
+ restricted to the given style layers and filtered by the given predicate.
Each object in the returned array represents a feature rendered by the
- current style and provides access to attributes specified by the relevant
- <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile sources</a>.
- The returned array includes features specified in vector and GeoJSON tile
- sources but does not include anything from raster, image, or video sources.
-
- Only visible features are returned. For example, suppose the current style uses
- the
+ current style and provides access to attributes specified by the relevant map
+ content sources. The returned array includes features loaded by
+ `MGLShapeSource` and `MGLVectorSource` objects but does not include anything
+ from `MGLRasterSource` objects, or from image, video, or canvas sources, which
+ are unsupported by this SDK.
+
+ The returned features are drawn by a style layer in the current style. For
+ example, suppose the current style uses the
<a href="https://www.mapbox.com/vector-tiles/mapbox-streets/">Mapbox Streets source</a>,
but none of the specified style layers includes features that have the `maki`
property set to `bus`. If you pass a point corresponding to the location of a
@@ -1224,13 +1225,18 @@ IB_DESIGNABLE
To find out the layer names in a particular style, view the style in
<a href="https://www.mapbox.com/studio/">Mapbox Studio</a>.
+ Only visible features are returned. To obtain features regardless of
+ visibility, use the
+ `-[MGLVectorSource featuresInSourceLayersWithIdentifiers:predicate:]` and
+ `-[MGLShapeSource featuresMatchingPredicate:]` methods on the relevant sources.
+
@note Layer identifiers are not guaranteed to exist across styles or different
- versions of the same style. Applications that use this API must first set the
- style URL to an explicitly versioned style using a convenience method like
- `+[MGLStyle outdoorsStyleURLWithVersion:]`, `MGLMapView`’s “Style URL”
+ versions of the same style. Applications that use this API must first set
+ the style URL to an explicitly versioned style using a convenience method
+ like `+[MGLStyle outdoorsStyleURLWithVersion:]`, `MGLMapView`’s “Style URL”
inspectable in Interface Builder, or a manually constructed `NSURL`. This
- approach also avoids layer identifer name changes that will occur in the default
- style’s layers over time.
+ approach also avoids layer identifer name changes that will occur in the
+ default style’s layers over time.
@param point A point expressed in the map view’s coordinate system.
@param styleLayerIdentifiers A set of strings that correspond to the names of
@@ -1261,9 +1267,9 @@ IB_DESIGNABLE
Returns an array of rendered map features that intersect with the given
rectangle, restricted to the given style layers.
- This method may return all features from the specified layers. To filter
- the returned features, use the
- `-visibleFeaturesAtPoint:inStyleLayersWithIdentifiers:predicate:` method. For
+ This method returns all the intersecting features from the specified layers. To
+ filter the returned features, use the
+ `-visibleFeaturesAtPoint:inStyleLayersWithIdentifiers:predicate:` method. For
more information about searching for map features, see that method’s
documentation.
@@ -1282,13 +1288,14 @@ IB_DESIGNABLE
predicate.
Each object in the returned array represents a feature rendered by the
- current style and provides access to attributes specified by the relevant
- <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile sources</a>.
- The returned array includes features specified in vector and GeoJSON tile
- sources but does not include anything from raster, image, or video sources.
-
- Only visible features are returned. For example, suppose the current style uses
- the
+ current style and provides access to attributes specified by the relevant map
+ content sources. The returned array includes features loaded by
+ `MGLShapeSource` and `MGLVectorSource` objects but does not include anything
+ from `MGLRasterSource` objects, or from image, video, or canvas sources, which
+ are unsupported by this SDK.
+
+ The returned features are drawn by a style layer in the current style. For
+ example, suppose the current style uses the
<a href="https://www.mapbox.com/vector-tiles/mapbox-streets/">Mapbox Streets source</a>,
but none of the specified style layers includes features that have the `maki`
property set to `bus`. If you pass a rectangle containing the location of a bus
@@ -1316,6 +1323,11 @@ IB_DESIGNABLE
To find out the layer names in a particular style, view the style in
<a href="https://www.mapbox.com/studio/">Mapbox Studio</a>.
+ Only visible features are returned. To obtain features regardless of
+ visibility, use the
+ `-[MGLVectorSource featuresInSourceLayersWithIdentifiers:predicate:]` and
+ `-[MGLShapeSource featuresMatchingPredicate:]` methods on the relevant sources.
+
@note Layer identifiers are not guaranteed to exist across styles or different
versions of the same style. Applications that use this API must first set the
style URL to an explicitly versioned style using a convenience method like
@@ -1324,6 +1336,14 @@ IB_DESIGNABLE
approach also avoids layer identifer name changes that will occur in the default
style’s layers over time.
+ @note Layer identifiers are not guaranteed to exist across styles or different
+ versions of the same style. Applications that use this API must first set
+ the style URL to an explicitly versioned style using a convenience method
+ like `+[MGLStyle outdoorsStyleURLWithVersion:]`, `MGLMapView`’s “Style URL”
+ inspectable in Interface Builder, or a manually constructed `NSURL`. This
+ approach also avoids layer identifer name changes that will occur in the
+ default style’s layers over time.
+
@param rect A rectangle expressed in the map view’s coordinate system.
@param styleLayerIdentifiers A set of strings that correspond to the names of
layers defined in the current style. Only the features contained in these