2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  {  Feature ,  Polygon  }  from  "geojson"  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								import  *  as  globallayers  from  "../assets/global-raster-layers.json"  
						 
					
						
							
								
									
										
										
										
											2024-10-13 21:37:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  *  as  globallayersEli  from  "../assets/generated/editor-layer-index-global.json"  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-14 11:41:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  *  as  bingJson  from  "../assets/bing.json"  
						 
					
						
							
								
									
										
										
										
											2024-08-11 16:27:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  {  BBox  }  from  "../Logic/BBox"  
						 
					
						
							
								
									
										
										
										
											2024-08-11 16:27:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  {  Store ,  Stores ,  UIEventSource  }  from  "../Logic/UIEventSource"  
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  {  GeoOperations  }  from  "../Logic/GeoOperations"  
						 
					
						
							
								
									
										
										
										
											2024-08-25 01:43:08 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  {  EliCategory ,  RasterLayerProperties  }  from  "./RasterLayerProperties"  
						 
					
						
							
								
									
										
										
										
											2024-08-11 16:27:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  {  Utils  }  from  "../Utils"  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-14 13:53:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export  type  EditorLayerIndex  =  ( Feature < Polygon ,  EditorLayerIndexProperties >  &  RasterLayerPolygon ) [ ]  
						 
					
						
							
								
									
										
										
										
											2023-03-11 02:37:07 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  class  AvailableRasterLayers  {  
						 
					
						
							
								
									
										
										
										
											2024-08-11 16:27:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    private  static  _editorLayerIndex : EditorLayerIndex  =  undefined 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-14 13:53:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    private  static  _editorLayerIndexStore : UIEventSource < EditorLayerIndex >  = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        new  UIEventSource < EditorLayerIndex > ( undefined ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-11 16:27:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    public  static  async  editorLayerIndex ( ) :  Promise < EditorLayerIndex >  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-14 13:53:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        if  ( AvailableRasterLayers . _editorLayerIndex  !==  undefined )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-11 16:27:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            return  AvailableRasterLayers . _editorLayerIndex 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        console . debug ( "Downloading ELI" ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-14 13:53:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        const  eli  =  await  Utils . downloadJson < {  features : EditorLayerIndex  } > ( 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-13 21:37:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            "./assets/data/editor-layer-index.json" , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-14 13:53:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-10 14:44:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        this . _editorLayerIndex  =  eli . features ? . filter ( ( l )  = >  l . properties . id  !==  "Bing" )  ? ?  [ ] 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-11 16:27:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        this . _editorLayerIndexStore . set ( this . _editorLayerIndex ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  this . _editorLayerIndex 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-10-13 21:37:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    public  static  readonly  globalLayers : ReadonlyArray < RasterLayerPolygon >  =  AvailableRasterLayers . initGlobalLayers ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    private  static  initGlobalLayers ( ) :  RasterLayerPolygon [ ]  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        const  gl : RasterLayerProperties [ ]  =  ( globallayers [ "default" ]  ? ?  globallayers  ) . layers 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            . filter ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                ( properties )  = > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    properties . id  !==  "osm.carto"  &&  properties . id  !==  "Bing" ,  /*Added separately*/ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        const  glEli : RasterLayerProperties [ ]  =  globallayersEli [ "default" ]  ? ?  globallayersEli 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        const  joined  =  gl . concat ( glEli ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( joined . some ( j  = >  ! j . id ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            console . log ( "Invalid layers:" ,  JSON . stringify ( joined  . filter ( l  = >  ! l . id ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            throw  "Detected invalid global layer with invalid id" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  joined . map ( 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-19 01:05:15 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            ( properties )  = > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                < RasterLayerPolygon > { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    type :  "Feature" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    properties , 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-02 12:48:15 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    geometry : BBox.global.asGeometry ( ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-13 21:37:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                } , 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-19 01:05:15 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-13 21:37:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-14 13:53:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    public  static  bing  =  < RasterLayerPolygon > bingJson 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    public  static  readonly  osmCartoProperties : RasterLayerProperties  =  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        id :  "osm" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        name :  "OpenStreetMap" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        url :  "https://tile.openstreetmap.org/{z}/{x}/{y}.png" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        attribution :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            text :  "OpenStreetMap" , 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-02 12:48:15 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            url :  "https://openStreetMap.org/copyright" , 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        best : true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        max_zoom : 19 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        min_zoom : 0 , 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-02 12:48:15 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        category :  "osmbasedmap" , 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-23 00:58:21 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    public  static  readonly  osmCarto : RasterLayerPolygon  =  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        type :  "Feature" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        properties : AvailableRasterLayers.osmCartoProperties , 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-02 12:48:15 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        geometry : BBox.global.asGeometry ( ) , 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2023-09-24 18:24:10 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-03-25 04:17:13 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  The  default  background  layer  that  any  theme  uses  which  does  not  explicitly  define  a  background 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-13 02:40:21 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    public  static  readonly  defaultBackgroundLayer : RasterLayerPolygon  = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        AvailableRasterLayers . globalLayers . find ( ( l )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return  l . properties . id  ===  "protomaps.sunny" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-21 17:37:50 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-14 13:53:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    public  static  layersAvailableAt ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        location : Store < {  lon : number ;  lat : number  } > , 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-13 21:37:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        enableBing? : Store < boolean > , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-14 13:53:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    ) :  {  store : Store < RasterLayerPolygon [ ] >  }  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        const  store  =  {  store : undefined  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        Utils . AddLazyProperty ( store ,  "store" ,  ( )  = > 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-13 21:37:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            AvailableRasterLayers . _layersAvailableAt ( location ,  enableBing ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-14 13:53:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-11 16:27:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        return  store 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    private  static  _layersAvailableAt ( 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-28 05:10:13 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        location : Store < {  lon : number ;  lat : number  } > , 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-13 21:37:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        enableBing? : Store < boolean > , 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    ) :  Store < RasterLayerPolygon [ ] >  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-11 16:27:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        this . editorLayerIndex ( )  // start the download
 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        const  availableLayersBboxes  =  Stores . ListStabilized ( 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-14 13:53:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            location . mapD ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                ( loc )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    const  eli  =  AvailableRasterLayers . _editorLayerIndexStore . data 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    if  ( ! eli )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        return  [ ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    const  lonlat :  [ number ,  number ]  =  [ loc . lon ,  loc . lat ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    return  eli . filter ( ( eliPolygon )  = >  BBox . get ( eliPolygon ) . contains ( lonlat ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } , 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-13 21:37:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                [ AvailableRasterLayers . _editorLayerIndexStore ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ) , 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-11 17:57:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        return  Stores . ListStabilized ( 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-28 05:10:13 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            availableLayersBboxes . map ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                ( eliPolygons )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    const  loc  =  location . data 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    const  lonlat :  [ number ,  number ]  =  [ loc . lon ,  loc . lat ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    const  matching : RasterLayerPolygon [ ]  =  eliPolygons . filter ( ( eliPolygon )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        if  ( eliPolygon . geometry  ===  null )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            return  true  // global ELI-layer
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        return  GeoOperations . inside ( lonlat ,  eliPolygon ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    matching . unshift ( AvailableRasterLayers . osmCarto ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-13 20:59:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-28 05:10:13 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    if  ( enableBing ? . data )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        matching . push ( AvailableRasterLayers . bing ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-28 05:10:13 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    matching . push ( . . . AvailableRasterLayers . globalLayers ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 16:06:26 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    if  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        ! matching . some ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            ( l )  = > 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-13 21:37:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                l . id  ===  AvailableRasterLayers . defaultBackgroundLayer . properties . id , 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 16:06:26 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-13 20:59:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        matching . push ( AvailableRasterLayers . defaultBackgroundLayer ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-28 05:10:13 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    return  matching 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } , 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-13 21:37:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                [ enableBing ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ) , 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-11 02:37:07 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  class  RasterLayerUtils  {  
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  Selects ,  from  the  given  list  of  available  rasterLayerPolygons ,  a  rasterLayer . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  This  rasterlayer  will  be  of  type  'preferredCategory'  and  will  be  of  the  'best' - layer  ( if  available ) . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  Returns  'undefined'  if  no  such  layer  is  available 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  @param  available 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  @param  preferredCategory 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  @param  ignoreLayer 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-23 03:47:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     *  @param  skipLayers  Skip  the  first  N  layers 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    public  static  SelectBestLayerAccordingTo ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        available : RasterLayerPolygon [ ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        preferredCategory : string , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-23 03:47:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        ignoreLayer? : RasterLayerPolygon , 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-13 21:37:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        skipLayers : number  =  0 , 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    ) :  RasterLayerPolygon  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-23 13:13:41 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        const  inCategory  =  available . filter ( ( l )  = >  l . properties . category  ===  preferredCategory ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        const  best : RasterLayerPolygon [ ]  =  inCategory . filter ( ( l )  = >  l . properties . best ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        const  others : RasterLayerPolygon [ ]  =  inCategory . filter ( ( l )  = >  ! l . properties . best ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-23 03:47:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        let  all  =  best . concat ( others ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-23 13:13:41 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        console . log ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            "Selected layers are:" , 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-13 21:37:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            all . map ( ( l )  = >  l . properties . id ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-23 13:13:41 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( others . length  >  skipLayers )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-23 03:47:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            all  =  all . slice ( skipLayers ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-08 17:38:28 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-23 03:47:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-23 13:13:41 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        return  all . find ( ( l )  = >  l  !==  ignoreLayer ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-11 02:37:07 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  type  RasterLayerPolygon  =  Feature < Polygon ,  RasterLayerProperties >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/ * *  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  Information  about  a  raster  tile  layer 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  Based  on  the  spec  here  https : //github.com/osmlab/editor-layer-index/blob/gh-pages/schema.json
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  which  was  then  converted  with  http : //borischerny.com/json-schema-to-typescript-browser/
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  interface  EditorLayerIndexProperties  extends  RasterLayerProperties  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								     *  The  name  of  the  imagery  source 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  name : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  Whether  the  imagery  name  should  be  translated 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  i18n? : boolean 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  type : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        |  "tms" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        |  "wms" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        |  "bing" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        |  "scanex" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        |  "wms_endpoint" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        |  "wmts" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        |  "vector"  /* Vector is not actually part of the ELI-spec, we add it for vector layers */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  A  rough  categorisation  of  different  types  of  layers .  See  https : //github.com/osmlab/editor-layer-index/blob/gh-pages/CONTRIBUTING.md#categories for a description of the individual categories.
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-11 02:37:07 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-25 01:43:08 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    readonly  category? : EliCategory 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  A  URL  template  for  imagery  tiles 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-02 12:48:15 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    readonly  url : string 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    readonly  min_zoom? : number 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  max_zoom? : number 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  explicit / implicit  permission  by  the  owner  for  use  in  OSM 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  permission_osm ? :  "explicit"  |  "implicit"  |  "no" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  A  URL  for  the  license  or  permissions  for  the  imagery 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  license_url? : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  A  URL  for  the  privacy  policy  of  the  operator  or  false  if  there  is  no  existing  privacy  policy  for  tis  imagery . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  privacy_policy_url? : string  |  boolean 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  A  unique  identifier  for  the  source ;  used  in  imagery_used  changeset  tag 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  id : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  A  short  English - language  description  of  the  source 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  description? : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  The  ISO  3166 - 1  alpha - 2  two  letter  country  code  in  upper  case .  Use  ZZ  for  unknown  or  multiple . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  country_code? : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  Whether  this  imagery  should  be  shown  in  the  default  world - wide  menu 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  default ? :  boolean 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  Whether  this  imagery  is  the  best  source  for  the  region 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  best? : boolean 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  The  age  of  the  oldest  imagery  or  data  in  the  source ,  as  an  RFC3339  date  or  leading  portion  of  one 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  start_date? : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  The  age  of  the  newest  imagery  or  data  in  the  source ,  as  an  RFC3339  date  or  leading  portion  of  one 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  end_date? : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  HTTP  header  to  check  for  information  if  the  tile  is  invalid 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  no_tile_header ? :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         *  This  interface  was  referenced  by  ` undefined ` ' s  JSON - Schema  definition 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         *  via  the  ` patternProperty `  "^.*$" . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        [ k : string ] :  string [ ]  |  null 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  'true'  if  tiles  are  transparent  and  can  be  overlaid  on  another  source 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  overlay? : boolean  &  string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  available_projections? : string [ ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  attribution ? :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        readonly  url? : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        readonly  text? : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        readonly  html? : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        readonly  required? : boolean 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  A  URL  for  an  image ,  that  can  be  displayed  in  the  list  of  imagery  layers  next  to  the  name 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  icon? : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  A  link  to  an  EULA  text  that  has  to  be  accepted  by  the  user ,  before  the  imagery  source  is  added .  Can  contain  { lang }  to  be  replaced  by  a  current  user  language  wiki  code  ( like  FR : )  or  an  empty  string  for  the  default  English  text . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  eula? : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  A  URL  for  an  image ,  that  is  displayed  in  the  mapview  for  attribution 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  "logo-image" ? :  string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  Customized  text  for  the  terms  of  use  link  ( default  is  "Background Terms of Use" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  "terms-of-use-text" ? :  string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  Specify  a  checksum  for  tiles ,  which  aren ' t  real  tiles .  ` type `  is  the  digest  type  and  can  be  MD5 ,  SHA - 1 ,  SHA - 256 ,  SHA - 384  and  SHA - 512 ,  value  is  the  hex  encoded  checksum  in  lower  case .  To  create  a  checksum  save  the  tile  as  file  and  upload  it  to  e . g .  https : //defuse.ca/checksums.htm.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  "no-tile-checksum" ? :  string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  header - name  attribute  specifies  a  header  returned  by  tile  server ,  that  will  be  shown  as  ` metadata-key `  attribute  in  Show  Tile  Info  dialog 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  "metadata-header" ? :  string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  Set  to  ` true `  if  imagery  source  is  properly  aligned  and  does  not  need  imagery  offset  adjustments .  This  is  used  for  OSM  based  sources  too . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  "valid-georeference" ? :  boolean 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  Size  of  individual  tiles  delivered  by  a  TMS  service 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  "tile-size" ? :  number 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  Whether  tiles  status  can  be  accessed  by  appending  / status  to  the  tile  URL  and  can  be  submitted  for  re - rendering  by  appending  / dirty . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  "mod-tile-features" ? :  string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  HTTP  headers  to  be  sent  to  server .  It  has  two  attributes  header - name  and  header - value .  May  be  specified  multiple  times . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  "custom-http-headers" ? :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        readonly  "header-name" ? :  string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        readonly  "header-value" ? :  string 
							 
						 
					
						
							
								
									
										
										
										
											2023-09-28 23:50:27 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-10 01:52:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  Default  layer  to  open  ( when  using  WMS_ENDPOINT  type ) .  Contains  list  of  layer  tag  with  two  attributes  -  name  and  style ,  e . g .  ` "default-layers": ["layer": { name="Basisdata_NP_Basiskart_JanMayen_WMTS_25829" "style":"default" } ] `  ( not  allowed  in  ` mirror `  attribute ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  "default-layers" ? :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        layer ? :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            "layer-name" ? :  string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            "layer-style" ? :  string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            [ k : string ] :  unknown 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        [ k : string ] :  unknown 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } [ ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  format  to  use  when  connecting  tile  server  ( when  using  WMS_ENDPOINT  type ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  format? : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  If  ` true `  transparent  tiles  will  be  requested  from  WMS  server 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  transparent? : boolean  &  string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  minimum  expiry  time  for  tiles  in  seconds .  The  larger  the  value ,  the  longer  entry  in  cache  will  be  considered  valid 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    readonly  "minimum-tile-expire" ? :  number 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-11 02:37:07 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}