| 
									
										
										
										
											2021-09-21 02:10:42 +02:00
										 |  |  | import {UIEventSource} from "../../UIEventSource"; | 
					
						
							|  |  |  | import FilteredLayer from "../../../Models/FilteredLayer"; | 
					
						
							| 
									
										
										
										
											2021-09-22 05:02:09 +02:00
										 |  |  | import {FeatureSourceForLayer, Tiled} from "../FeatureSource"; | 
					
						
							|  |  |  | import {BBox} from "../../GeoOperations"; | 
					
						
							|  |  |  | import {Utils} from "../../../Utils"; | 
					
						
							| 
									
										
										
										
											2021-09-20 17:14:55 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-22 05:02:09 +02:00
										 |  |  | export default class SimpleFeatureSource implements FeatureSourceForLayer, Tiled { | 
					
						
							| 
									
										
										
										
											2021-09-20 17:14:55 +02:00
										 |  |  |     public readonly features: UIEventSource<{ feature: any; freshness: Date }[]> = new UIEventSource<{ feature: any; freshness: Date }[]>([]); | 
					
						
							|  |  |  |     public readonly name: string = "SimpleFeatureSource"; | 
					
						
							|  |  |  |     public readonly layer: FilteredLayer; | 
					
						
							| 
									
										
										
										
											2021-09-22 05:02:09 +02:00
										 |  |  |     public readonly bbox: BBox = BBox.global; | 
					
						
							|  |  |  |     public readonly tileIndex: number = Utils.tile_index(0, 0, 0); | 
					
						
							| 
									
										
										
										
											2021-09-20 17:14:55 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     constructor(layer: FilteredLayer) { | 
					
						
							| 
									
										
										
										
											2021-09-22 05:02:09 +02:00
										 |  |  |         this.name = "SimpleFeatureSource(" + layer.layerDef.id + ")" | 
					
						
							| 
									
										
										
										
											2021-09-20 17:14:55 +02:00
										 |  |  |         this.layer = layer | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } |