import { AbstractSentinelHubV3WithCCLayer } from './AbstractSentinelHubV3WithCCLayer' ; import { Link , LinkType } from './const' ; export class AbstractLandsat8Layer extends AbstractSentinelHubV3WithCCLayer { protected getTileLinks ( tile ) { return [ { target : tile . dataUri , type : LinkType . AWS , } , { target : `${ tile . dataUri }_thumb_small.jpg` , type : LinkType . PREVIEW , } , ] ; } protected extractFindTilesMeta ( tile ) { return { ... super . extractFindTilesMeta ( tile ) , sunElevation : tile . sunElevation , } ; } protected extractFindTilesMetaFromCatalog ( feature ) { return { ... super . extractFindTilesMetaFromCatalog ( feature ) , sunElevation : feature . properties [ 'view:sun_elevation' ] , projEpsg : feature . properties [ 'proj:epsg' ] , } ; } protected getTileLinksFromCatalog ( feature ) { const { assets } = feature ; let result = super . getTileLinksFromCatalog ( feature ) ; if ( assets . data && assets . data . href ) { result . push ( { target : assets . data . href . replace ( '/index.html' , `/${ feature . id }_thumb_small.jpg` ) , type : LinkType . PREVIEW , } ) ; } return result ; } }