summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyle.h
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src/MGLStyle.h')
-rw-r--r--platform/darwin/src/MGLStyle.h100
1 files changed, 50 insertions, 50 deletions
diff --git a/platform/darwin/src/MGLStyle.h b/platform/darwin/src/MGLStyle.h
index 25096748f6..689faf78cf 100644
--- a/platform/darwin/src/MGLStyle.h
+++ b/platform/darwin/src/MGLStyle.h
@@ -32,16 +32,16 @@ static MGL_EXPORT const NSInteger MGLStyleDefaultVersion = 9;
/**
The proxy object for the current map style.
-
+
MGLStyle provides a set of convenience methods for changing Mapbox
default styles using `-[MGLMapView styleURL]`.
<a href="https://www.mapbox.com/maps/">Learn more about Mapbox default styles</a>.
-
- It is also possible to directly manipulate the current map style
+
+ It is also possible to directly manipulate the current map style
via `-[MGLMapView style]` by updating the style's data sources or layers.
-
+
@note Wait until the map style has finished loading before modifying a map's
- style via any of the `MGLStyle` instance methods below. You can use the
+ style via any of the `MGLStyle` instance methods below. You can use the
`-[MGLMapViewDelegate mapView:didFinishLoadingStyle:]` or
`-[MGLMapViewDelegate mapViewDidFinishLoadingMap:]` methods as indicators
that it's safe to modify the map's style.
@@ -199,7 +199,7 @@ MGL_EXPORT
@note Source 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”
+ `+[MGLStyle outdoorsStyleURLWithVersion:]`, `MGLMapView`’s “Style URL”
inspectable in Interface Builder, or a manually constructed `NSURL`. This
approach also avoids source identifer name changes that will occur in the default
style’s sources over time.
@@ -211,15 +211,15 @@ MGL_EXPORT
/**
Adds a new source to the current style.
-
+
@note Adding the same source instance more than once will result in a
`MGLRedundantSourceException`. Reusing the same source identifier, even with
- different source instances, will result in a
- `MGLRedundantSourceIdentifierException`.
-
- @note Sources should be added in
+ different source instances, will result in a
+ `MGLRedundantSourceIdentifierException`.
+
+ @note Sources should be added in
`-[MGLMapViewDelegate mapView:didFinishLoadingStyle:]` or
- `-[MGLMapViewDelegate mapViewDidFinishLoadingMap:]` to ensure that the map
+ `-[MGLMapViewDelegate mapViewDidFinishLoadingMap:]` to ensure that the map
has loaded the style and is ready to accept a new source.
@param source The source to add to the current style.
@@ -228,11 +228,11 @@ MGL_EXPORT
/**
Removes a source from the current style.
-
+
@note Source 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”
+ `+[MGLStyle outdoorsStyleURLWithVersion:]`, `MGLMapView`’s “Style URL”
inspectable in Interface Builder, or a manually constructed `NSURL`. This
approach also avoids source identifer name changes that will occur in the default
style’s sources over time.
@@ -251,15 +251,15 @@ MGL_EXPORT
/**
Returns a style layer with the given identifier in the current style.
-
+
@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”
+ `+[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.
-
+
@return An instance of a concrete subclass of `MGLStyleLayer` associated with
the given identifier, or `nil` if the current style contains no such style
layer.
@@ -268,14 +268,14 @@ MGL_EXPORT
/**
Adds a new layer on top of existing layers.
-
+
@note Adding the same layer instance more than once will result in a
`MGLRedundantLayerException`. Reusing the same layer identifer, even with
- different layer instances, will also result in an exception.
-
- @note Layers should be added in
+ different layer instances, will also result in an exception.
+
+ @note Layers should be added in
`-[MGLMapViewDelegate mapView:didFinishLoadingStyle:]` or
- `-[MGLMapViewDelegate mapViewDidFinishLoadingMap:]` to ensure that the map
+ `-[MGLMapViewDelegate mapViewDidFinishLoadingMap:]` to ensure that the map
has loaded the style and is ready to accept a new layer.
@param layer The layer object to add to the map view. This object must be an
@@ -285,14 +285,14 @@ MGL_EXPORT
/**
Inserts a new layer into the style at the given index.
-
+
@note Adding the same layer instance more than once will result in a
`MGLRedundantLayerException`. Reusing the same layer identifer, even with
- different layer instances, will also result in an exception.
-
+ different layer instances, will also result in an exception.
+
@note Layers should be added in
`-[MGLMapViewDelegate mapView:didFinishLoadingStyle:]` or
- `-[MGLMapViewDelegate mapViewDidFinishLoadingMap:]` to ensure that the map
+ `-[MGLMapViewDelegate mapViewDidFinishLoadingMap:]` to ensure that the map
has loaded the style and is ready to accept a new layer.
@param layer The layer to insert.
@@ -304,15 +304,15 @@ MGL_EXPORT
/**
Inserts a new layer below another layer.
-
+
@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”
+ `+[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.
-
+
Inserting the same layer instance more than once will result in a
`MGLRedundantLayerException`. Reusing the same layer identifer, even with
different layer instances, will also result in an exception.
@@ -324,15 +324,15 @@ MGL_EXPORT
/**
Inserts a new layer above another layer.
-
+
@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”
+ `+[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.
-
+
Inserting the same layer instance more than once will result in a
`MGLRedundantLayerException`. Reusing the same layer identifer, even with
different layer instances, will also result in an exception.
@@ -344,11 +344,11 @@ MGL_EXPORT
/**
Removes a layer from the map view.
-
+
@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”
+ `+[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.
@@ -363,7 +363,7 @@ MGL_EXPORT
/**
Currently active style classes, represented as an array of string identifiers.
*/
-@property (nonatomic) NS_ARRAY_OF(NSString *) *styleClasses;
+@property (nonatomic) NS_ARRAY_OF(NSString *) *styleClasses __attribute__((deprecated("This property will be removed in a future release.")));
/**
Returns a Boolean value indicating whether the style class with the given
@@ -372,43 +372,43 @@ MGL_EXPORT
@param styleClass The style class to query for.
@return Whether the style class is currently active.
*/
-- (BOOL)hasStyleClass:(NSString *)styleClass;
+- (BOOL)hasStyleClass:(NSString *)styleClass __attribute__((deprecated("This method will be removed in a future release.")));
/**
Activates the style class with the given identifier.
@param styleClass The style class to activate.
*/
-- (void)addStyleClass:(NSString *)styleClass;
+- (void)addStyleClass:(NSString *)styleClass __attribute__((deprecated("This method will be removed in a future release.")));
/**
Deactivates the style class with the given identifier.
-
+
@note Style class names 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”
+ `+[MGLStyle outdoorsStyleURLWithVersion:]`, `MGLMapView`’s “Style URL”
inspectable in Interface Builder, or a manually constructed `NSURL`. This
approach also avoids style class name changes that will occur in the default
style over time.
@param styleClass The style class to deactivate.
*/
-- (void)removeStyleClass:(NSString *)styleClass;
+- (void)removeStyleClass:(NSString *)styleClass __attribute__((deprecated("This method will be removed in a future release.")));
#pragma mark Managing a Style’s Images
/**
Returns the image associated with the given name in the style.
-
+
@note Names and their associated images 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 image name changes that will
+ `MGLMapView`’s “Style URL” inspectable in Interface Builder, or a manually
+ constructed `NSURL`. This approach also avoids image name changes that will
occur in the default style over time.
-
+
@param name The name associated with the image you want to obtain.
@return The image associated with the given name, or `nil` if no image is
associated with that name.
@@ -417,11 +417,11 @@ MGL_EXPORT
/**
Adds or overrides an image used by the style’s layers.
-
+
To use an image in a style layer, give it a unique name using this method, then
set the `iconImageName` property of an `MGLSymbolStyleLayer` object to that
name.
-
+
@param image The image for the name.
@param name The name of the image to set to the style.
*/
@@ -429,13 +429,13 @@ MGL_EXPORT
/**
Removes a name and its associated image from the style.
-
+
@note Names and their associated images 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 image name changes that will
+ `MGLMapView`’s “Style URL” inspectable in Interface Builder, or a manually
+ constructed `NSURL`. This approach also avoids image name changes that will
occur in the default style over time.
@param name The name of the image to remove.
@@ -446,7 +446,7 @@ MGL_EXPORT
/**
The duration in seconds to animate any changes to the style URL or to layout and paint attributes.
-
+
By default, this property is set to zero seconds, so any changes take effect without animation.
*/
@property (nonatomic) NSTimeInterval transitionDuration;