RasterDataSource.withTileSourceAndListener constructor

RasterDataSource.withTileSourceAndListener(
  1. MapContext context,
  2. String name,
  3. RasterTileSource tileSource,
  4. RasterDataSourceListener listener,
)

Creates a RasterDataSource instance with the provided raster tile source and registers a listener.

Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.

  • context The map context to associate the data source with.

  • name The unique name of the data source.

  • tileSource The raster tile source.

  • listener The initial listener to be registered for receiving state notifications. Due to the asynchronous nature of the data source initialization, the listeners registered later might miss some notifications. This listener is guaranteed to receive all notifications. The state notifications can occur on an arbitrary thread.

Implementation

factory RasterDataSource.withTileSourceAndListener(MapContext context, String name, RasterTileSource tileSource, RasterDataSourceListener listener) => $prototype.withTileSourceAndListener(context, name, tileSource, listener);