summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLPointAnnotation.h
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-12-20 16:11:05 -0800
committerGitHub <noreply@github.com>2016-12-20 16:11:05 -0800
commit1254bcdb4006d87fefedfc5020b3dc7d3cd0e544 (patch)
tree8ee29bf1575993965c2040b1318fb70388a255a9 /platform/darwin/src/MGLPointAnnotation.h
parenta174588e6ccb5c0101479c882d399a07ba96ba76 (diff)
downloadqtlocation-mapboxgl-1254bcdb4006d87fefedfc5020b3dc7d3cd0e544.tar.gz
[ios, macos] Update and reformat documentation for runtime styling (#7475)
* [ios, macos] Optimized changelog for runtime styling Changelog entries related to style JSON now lead off with the analogous portion of the runtime styling API. * [ios, macos] Autolink cross-class property references in docs jazzy can autolink `Class.property` references in documentation comments. * [ios, macos] Removed extra blank lines * [ios, macos] Corrected typo in MGLMultiPoint docs * [ios, macos] Rewrote shape and feature docs Rewrote documentation about MGLShape, its subclasses, and MGLFeature to emphasize runtime styling uses over annotation uses, associate each type with real-world concepts, cross-reference related style layer classes, and cross-reference related or easily confused shape classes. Links to the GeoJSON specification have been updated to RFC 7946. * [ios, macos] Expanded style layer docs With this change, documentation about style layer classes is nominally based on the documentation in the style specification. However, all the existing layer types’ documentation has been overridden to explain what the layer looks like, relate the layer to a real-world concept, and cross-reference related geometry classes. This change also corrects the description of MGLBackgroundStyleLayer, which erroneously stated that the identifier must be “background”, whereas that only happens to be true by default for Studio template styles. * [ios, macos] Wrap style layer docs * [ios, macos] Removed unused code * [ios, macos] Corrected symbol references in docs * [ios, macos] Corrected typo in abstract class exception
Diffstat (limited to 'platform/darwin/src/MGLPointAnnotation.h')
-rw-r--r--platform/darwin/src/MGLPointAnnotation.h32
1 files changed, 27 insertions, 5 deletions
diff --git a/platform/darwin/src/MGLPointAnnotation.h b/platform/darwin/src/MGLPointAnnotation.h
index b552912f97..969f8c91e7 100644
--- a/platform/darwin/src/MGLPointAnnotation.h
+++ b/platform/darwin/src/MGLPointAnnotation.h
@@ -6,15 +6,37 @@
NS_ASSUME_NONNULL_BEGIN
/**
- The `MGLPointAnnotation` class defines a concrete annotation object located at
- a specified point. You can use this class, rather than define your own, in
- situations where all you want to do is associate a point on the map with a
- title.
+ An `MGLPointAnnotation` object represents a one-dimensional shape located at a
+ single geographical coordinate. Depending on how it is used, an
+ `MGLPointAnnotation` object is known as a point annotation or point shape. For
+ example, you could use a point shape to represent a city at low zoom levels, an
+ address at high zoom levels, or the location of a long press gesture.
+
+ You can add point shapes to the map by adding them to an `MGLShapeSource`
+ object. Configure the appearance of an `MGLShapeSource`’s or
+ `MGLVectorSource`’s point shapes collectively using an `MGLCircleStyleLayer` or
+ `MGLSymbolStyleLayer` object.
+
+ For more interactivity, add a selectable point annotation to a map view using
+ the `-[MGLMapView addAnnotation:]` method. Alternatively, define your own model
+ class that conforms to the `MGLAnnotation` protocol. Configure a point
+ annotation’s appearance using
+ `-[MGLMapViewDelegate mapView:imageForAnnotation:]` or
+ `-[MGLMapViewDelegate mapView:viewForAnnotation:]` (iOS only). A point
+ annotation’s `MGLShape.title` and `MGLShape.subtitle` properties define the
+ default content of the annotation’s callout (on iOS) or popover (on macOS).
+
+ To group multiple related points together in one shape, use an
+ `MGLPointCollection` or `MGLShapeCollection` object.
+
+ A point shape is known as a
+ <a href="https://tools.ietf.org/html/rfc7946#section-3.1.2">Point</a> geometry
+ in GeoJSON.
*/
@interface MGLPointAnnotation : MGLShape
/**
- The coordinate point of the annotation, specified as a latitude and longitude.
+ The coordinate point of the shape, specified as a latitude and longitude.
*/
@property (nonatomic, assign) CLLocationCoordinate2D coordinate;