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
type
of an event isSourceDataLoadedType.Tile
, theloaded
property will be set totrue
if all source data required for the visible viewport of themap
are loaded.Note: The property will be null for the
type
other thanSourceDataLoadedType.Tile
.Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSNumber *loaded;
-
When the
type
of an event isSourceDataLoadedType.Tile
thetileId
property defines the tile coordinate.Declaration
Objective-C
@property (nonatomic, readonly, nullable) MBMCanonicalTileID *tileId;
Swift
var tileId: MBMCanonicalTileID? { get }
-
When the
type
of an event isSourceDataLoadedType.Metadata
and the data identifier was provided to thesetStyleGeoJSONSourceData
method, this property can be used to determine what data was loaded by theGeoJSON
source.Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *dataId;
Swift
var dataId: String? { get }
-
The
timeInterval.begin
is when source data begins loading, and thetimeInterval.end
is when source data is loaded.Declaration
Objective-C
@property (nonatomic, readonly, nonnull) MBMEventTimeInterval *timeInterval;
Swift
var timeInterval: MBMEventTimeInterval { get }