RegionsAndImagesRepository

class RegionsAndImagesRepository @Inject constructor(administrativeUnitDataSource: AdministrativeUnitDataSource, imageDataSource: ImageDataSource, currentRegionDataSource: CurrentRegionDataSource)

The repository that exposes and manipulates Regions and Images screen's flows.

Constructors

Link copied to clipboard
@Inject
constructor(administrativeUnitDataSource: AdministrativeUnitDataSource, imageDataSource: ImageDataSource, currentRegionDataSource: CurrentRegionDataSource)

Properties

Retrieves from data source all active regions within the current bounding box. When the user move the map with gestures the visible area will change this change will send a new bounding box, triggering this flow to send the regions within the new bounding box.

Link copied to clipboard

the bounding box that encloses all images, used in the screen to power the zoom to fit feature.

Link copied to clipboard

Retrieves from data source all images within the current bounding box. When the user move the map with gestures the visible area will change this change will send a new bounding box, triggering this flow to send the images within the new bounding box.

Functions

Link copied to clipboard

the method triggers when the user select a region in the map. The method update the region to the datasource.

Link copied to clipboard
fun updateBoundingBox(boundingBox: BoundingBox)

the method triggers when the visible map area changes, generating a new bounding box.