import { DATASET_EOCLOUD_LANDSAT8 } from './dataset' ; import { AbstractSentinelHubV1OrV2WithCCLayer } from './AbstractSentinelHubV1OrV2WithCCLayer' ; import { Link , LinkType } from './const' ; export class Landsat8EOCloudLayer extends AbstractSentinelHubV1OrV2WithCCLayer { public readonly dataset = DATASET_EOCLOUD_LANDSAT8 ; public static makeLayer ( layerInfo , instanceId , layerId , evalscript , evalscriptUrl , title , description ) { const maxCloudCoverPercent = layerInfo . settings . maxCC ; return new Landsat8EOCloudLayer ( { instanceId , layerId , evalscript , evalscriptUrl , title , description , maxCloudCoverPercent , } ) ; } protected getTileLinks ( tile ) { return [ { target : tile . pathFragment , type : LinkType . EOCLOUD , } , { target : `https://finder.creodias.eu/files${ tile . pathFragment . replace ( '/eodata' , '' ) }.png` , type : LinkType . PREVIEW , } , ] ; } protected extractFindTilesMeta ( tile ) { return { ... super . extractFindTilesMeta ( tile ) , sunElevation : tile . sunElevation , } ; } }