summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLSource.h
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src/MGLSource.h')
-rw-r--r--platform/darwin/src/MGLSource.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/platform/darwin/src/MGLSource.h b/platform/darwin/src/MGLSource.h
index ec3733bf08..6b381fca19 100644
--- a/platform/darwin/src/MGLSource.h
+++ b/platform/darwin/src/MGLSource.h
@@ -1,17 +1,29 @@
#import <Foundation/Foundation.h>
+NS_ASSUME_NONNULL_BEGIN
+
/**
- A source supplies data to be shown on the map. Sources don't contain styling
- details like color or width. Use subclasses of `MGLStyleLayer` to give visual
- representation to sources.
+ `MGLSource` is an abstract base class for map content sources. A map content
+ source supplies content to be shown on the map. A source is added to an
+ `MGLStyle` object along with an `MGLForegroundStyleLayer` object. The
+ foreground style layer defines the appearance of any content supplied by the
+ source.
+
+ Each source defined by the style JSON file is represented at runtime by an
+ `MGLSource` object that you can use to refine the map’s content. You can also
+ add and remove sources dynamically using methods such as
+ `-[MGLStyle addSource:]` and `-[MGLStyle sourceWithIdentifier:]`.
- You should use the concrete subclasses of `MGLSource` to create vector,
- raster, GeoJSON, and other source types.
+ Do not create instances of this class directly, and do not create your own
+ subclasses of this class. Instead, create instances of `MGLShapeSource` and the
+ concrete subclasses of `MGLTileSource`.
*/
@interface MGLSource : NSObject
#pragma mark Initializing a Source
+- (instancetype)init __attribute__((unavailable("Use -initWithIdentifier: instead.")));
+
/**
Returns a source initialized with an identifier.
@@ -32,3 +44,5 @@
@property (nonatomic, copy) NSString *identifier;
@end
+
+NS_ASSUME_NONNULL_END