diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-12-20 16:11:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-20 16:11:05 -0800 |
commit | 1254bcdb4006d87fefedfc5020b3dc7d3cd0e544 (patch) | |
tree | 8ee29bf1575993965c2040b1318fb70388a255a9 /platform/darwin/src/MGLOpenGLStyleLayer.mm | |
parent | a174588e6ccb5c0101479c882d399a07ba96ba76 (diff) | |
download | qtlocation-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/MGLOpenGLStyleLayer.mm')
-rw-r--r-- | platform/darwin/src/MGLOpenGLStyleLayer.mm | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/platform/darwin/src/MGLOpenGLStyleLayer.mm b/platform/darwin/src/MGLOpenGLStyleLayer.mm index f109ea85b0..ac2a6abcd9 100644 --- a/platform/darwin/src/MGLOpenGLStyleLayer.mm +++ b/platform/darwin/src/MGLOpenGLStyleLayer.mm @@ -52,10 +52,19 @@ void MGLFinishCustomStyleLayer(void *context) { } /** - An `MGLOpenGLStyleLayer` is a style layer that is rendered by OpenGL code in - Objective-C blocks or Swift closures that you specify. You may initialize a new - OpenGL style layer to add to an `MGLStyle` or obtain one from an `MGLMapView`’s - current style using the `-[MGLStyle layerWithIdentifier:]` method. + An `MGLOpenGLStyleLayer` is a style layer that is rendered by OpenGL code that + you provide. + + By default, this class does nothing. You can subclass this class to provide + custom OpenGL drawing code that is run on each frame of the map. Your subclass + should override the `-didMoveToMapView:`, `-willMoveFromMapView:`, and + `-drawInMapView:withContext:` methods. + + You can access an existing OpenGL style layer using the + `-[MGLStyle layerWithIdentifier:]` method if you know its identifier; + otherwise, find it using the `MGLStyle.layers` property. You can also create a + new OpenGL style layer and add it to the style using a method such as + `-[MGLStyle addLayer:]`. @warning This API is undocumented and therefore unsupported. It may change at any time without notice. |