MBMSourceDataLoaded
@interface MBMSourceDataLoaded : NSObject
The SourceDataLoaded event is emitted when source data is loaded.
Note: The event will be emitted synchronously in cases when the source’s metadata is available when a source is added to the style.
-
Unavailable
Undocumented
Declaration
Objective-C
- (nonnull instancetype)init NS_UNAVAILABLE; -
Unavailable
Undocumented
Declaration
Objective-C
+ (nonnull instancetype)new NS_UNAVAILABLE; -
Undocumented
Declaration
Objective-C
- (nonnull instancetype)initWithSourceId:(nonnull NSString *)sourceId type:(MBMSourceDataLoadedType)type loaded:(nullable NSNumber *)loaded tileId:(nullable MBMCanonicalTileID *)tileId dataId:(nullable NSString *)dataId timeInterval:(nonnull MBMEventTimeInterval *)timeInterval NS_REFINED_FOR_SWIFT; -
The identifier of a source.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nonnull) NSString *sourceId;Swift
var sourceId: String { get } -
The type of a loaded data.
Declaration
Objective-C
@property (nonatomic, readonly) MBMSourceDataLoadedType type;Swift
var type: SourceDataLoadedType { get } -
When the
typeof an event isSourceDataLoadedType.Tile, theloadedproperty will be set totrueif all source data required for the visible viewport of themapare loaded.Note: The property will be null for the
typeother thanSourceDataLoadedType.Tile.Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSNumber *loaded; -
When the
typeof an event isSourceDataLoadedType.TilethetileIdproperty defines the tile coordinate.Declaration
Objective-C
@property (nonatomic, readonly, nullable) MBMCanonicalTileID *tileId;Swift
var tileId: MBMCanonicalTileID? { get } -
When the
typeof an event isSourceDataLoadedType.Metadataand the data identifier was provided to thesetStyleGeoJSONSourceDatamethod, this property can be used to determine what data was loaded by theGeoJSONsource.Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *dataId;Swift
var dataId: String? { get } -
The
timeInterval.beginis when source data begins loading, and thetimeInterval.endis when source data is loaded.Declaration
Objective-C
@property (nonatomic, readonly, nonnull) MBMEventTimeInterval *timeInterval;Swift
var timeInterval: MBMEventTimeInterval { get }
MBMSourceDataLoaded Class Reference