summaryrefslogtreecommitdiff
path: root/platform/macos/src/MGLMapView.h
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-08-19 13:56:46 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-11-28 15:45:43 -0800
commit9fac640bf35db408f56103b45f8ef7982204bfa9 (patch)
tree95fe49ae283c682db98d3b63a8ebbebf03769450 /platform/macos/src/MGLMapView.h
parent850b70ff91e582916829c5248afcafa195070a43 (diff)
downloadqtlocation-mapboxgl-9fac640bf35db408f56103b45f8ef7982204bfa9.tar.gz
[ios, macos] Key-value compliance for MGLStyle
Replaced -[MGLMapView style] with a property. Keep the MGLStyle object around for the lifetime of the style. Bracket changes to layers in willChange and didChange calls. The built-in point annotation layer is added after the style is finished loading but before the map is finished loading. Cause a second wave of change notifications to go out, about both sources and layers. Issue change notifications for style layers when shape annotations are added or removed.
Diffstat (limited to 'platform/macos/src/MGLMapView.h')
-rw-r--r--platform/macos/src/MGLMapView.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/platform/macos/src/MGLMapView.h b/platform/macos/src/MGLMapView.h
index 3dbbbe3d82..5ffc04e658 100644
--- a/platform/macos/src/MGLMapView.h
+++ b/platform/macos/src/MGLMapView.h
@@ -89,6 +89,14 @@ IB_DESIGNABLE
#pragma mark Configuring the Map’s Appearance
/**
+ The style currently displayed in the receiver.
+
+ Unlike the `styleURL` property, this property is set to an object that allows
+ you to manipulate every aspect of the style locally.
+ */
+@property (nonatomic, readonly) MGLStyle *style;
+
+/**
URL of the style currently displayed in the receiver.
The URL may be a full HTTP or HTTPS URL, a Mapbox URL indicating the style’s
@@ -97,6 +105,9 @@ IB_DESIGNABLE
If you set this property to `nil`, the receiver will use the default style and
this property will automatically be set to that style’s URL.
+
+ If you want to modify the current style without replacing it outright, or if
+ you want to introspect individual style attributes, use the `style` property.
*/
@property (nonatomic, null_resettable) NSURL *styleURL;
@@ -926,10 +937,6 @@ IB_DESIGNABLE
*/
@property (nonatomic) MGLMapDebugMaskOptions debugMask;
-#pragma mark Runtime styling API
-
-- (MGLStyle *)style;
-
@end
NS_ASSUME_NONNULL_END