DingiSource


@interface DingiSource : NSObject

DingiSource 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 DingiStyle object along with an DingiForegroundStyleLayer 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 DingiSource object that you can use to refine the map’s content. You can also add and remove sources dynamically using methods such as -[DingiStyle addSource:] and -[DingiStyle sourceWithIdentifier:].

Create instances of DingiShapeSource, DingiComputedShapeSource, DingiImageSource, and the concrete subclasses of DingiTileSource (DingiVectorTileSource and DingiRasterTileSource) in order to use DingiSource’s properties and methods. Do not create instances of DingiSource directly, and do not create your own subclasses of this class.

  • Returns a source initialized with an identifier.

    After initializing and configuring the source, add it to a map view’s style using the -[DingiStyle addSource:] method.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithIdentifier:(nonnull NSString *)identifier;

    Swift

    init(identifier: String)

    Parameters

    identifier

    A string that uniquely identifies the source in the style to which it is added.

    Return Value

    An initialized source.

  • A string that uniquely identifies the source in the style to which it is added.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSString *_Nonnull identifier;

    Swift

    var identifier: String { get set }