RasterDataSource class abstract

Data source to load map layers using a raster image format (jpg, png).

The example below illustrates how to create a raster data source and how to link it to a newly created map layer.

 final rasterDataSource = RasterDataSource(mapContext, rasterDataSourceConfig);

 var layer = MapLayerBuilder()
     // The name and the type of the data source have to be provided.
     // In our case, the name of the raster data source is in rasterDataSourceConfig.
     .withDataSource(rasterDataSourceConfig.name, MapContentType.rasterImage)
     .forMap(map)
     .withName("rasterLayer")
     .build();

Constructors

RasterDataSource(MapContext context, RasterDataSourceConfiguration configuration)
Creates a RasterDataSource instance with the provided data source configuration.
factory
RasterDataSource.withConfigurationAndListener(MapContext context, RasterDataSourceConfiguration configuration, RasterDataSourceListener listener)
Creates a RasterDataSource instance with the provided data source configuration and registers a listener.
factory
RasterDataSource.withTileSource(MapContext context, String name, RasterTileSource tileSource)
Creates a RasterDataSource instance with the provided raster tile source.
factory
RasterDataSource.withTileSourceAndListener(MapContext context, String name, RasterTileSource tileSource, RasterDataSourceListener listener)
Creates a RasterDataSource instance with the provided raster tile source and registers a listener.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(RasterDataSourceListener listener) → void
Add listener for receiving state notifications.
changeConfiguration(RasterDataSourceConfigurationUpdate configuration) → void
Applies the configuration update to the data source.
destroy() → void
Frees all internally used resources.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeListener(RasterDataSourceListener listener) → void
Remove a listener from receiving state notifications.
removeListeners() → void
Remove all listeners from receiving state notifications.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited