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 is SourceDataLoadedType.Tile, the loaded property will be set to true if all source data required for the visible viewport of the map are loaded.

    Note: The property will be null for the type other than SourceDataLoadedType.Tile.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *loaded;
  • When the type of an event is SourceDataLoadedType.Tile the tileId 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 is SourceDataLoadedType.Metadata and the data identifier was provided to the setStyleGeoJSONSourceData method, this property can be used to determine what data was loaded by the GeoJSON 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 the timeInterval.end is when source data is loaded.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) MBMEventTimeInterval *timeInterval;

    Swift

    var timeInterval: MBMEventTimeInterval { get }