import { MosaickingOrder } from './const' ; import { AbstractSentinelHubV1OrV2Layer } from './AbstractSentinelHubV1OrV2Layer' ; interface ConstructorParameters { instanceId ? : string | null ; layerId ? : string | null ; evalscript ? : string | null ; evalscriptUrl ? : string | null ; title ? : string | null ; description ? : string | null ; maxCloudCoverPercent ? : number | null ; mosaickingOrder ? : MosaickingOrder | null ; } export class AbstractSentinelHubV1OrV2WithCCLayer extends AbstractSentinelHubV1OrV2Layer { public maxCloudCoverPercent : number ; public constructor ( { maxCloudCoverPercent = 100 , ... rest } ) { super ( rest ) ; this . maxCloudCoverPercent = maxCloudCoverPercent ; } protected getWmsGetMapUrlAdditionalParameters ( ) { return { ... super . getWmsGetMapUrlAdditionalParameters ( ) , maxcc : this . maxCloudCoverPercent , } ; } protected getFindTilesAdditionalParameters ( ) { return { maxcc : this . maxCloudCoverPercent / 100 , } ; } protected extractFindTilesMeta ( tile ) { return { cloudCoverPercent : tile . cloudCoverPercentage , } ; } protected async getFindDatesUTCAdditionalParameters ( ) { return { maxcc : this . maxCloudCoverPercent / 100 , } ; } protected getStatsAdditionalParameters ( ) { return { maxcc : this . maxCloudCoverPercent , } ; } }