forked from MapComplete/MapComplete
		
	refactoring
This commit is contained in:
		
							parent
							
								
									b94a8f5745
								
							
						
					
					
						commit
						5d0fe31c41
					
				
					 114 changed files with 2412 additions and 2958 deletions
				
			
		|  | @ -0,0 +1,28 @@ | |||
| import DynamicTileSource from "./DynamicTileSource" | ||||
| import { Store } from "../../UIEventSource" | ||||
| import { BBox } from "../../BBox" | ||||
| import TileLocalStorage from "../Actors/TileLocalStorage" | ||||
| import { Feature } from "geojson" | ||||
| import StaticFeatureSource from "../Sources/StaticFeatureSource" | ||||
| 
 | ||||
| export default class LocalStorageFeatureSource extends DynamicTileSource { | ||||
|     constructor( | ||||
|         layername: string, | ||||
|         zoomlevel: number, | ||||
|         mapProperties: { | ||||
|             bounds: Store<BBox> | ||||
|             zoom: Store<number> | ||||
|         }, | ||||
|         options?: { | ||||
|             isActive?: Store<boolean> | ||||
|         } | ||||
|     ) { | ||||
|         const storage = TileLocalStorage.construct<Feature[]>(layername) | ||||
|         super( | ||||
|             zoomlevel, | ||||
|             (tileIndex) => new StaticFeatureSource(storage.getTileSource(tileIndex)), | ||||
|             mapProperties, | ||||
|             options | ||||
|         ) | ||||
|     } | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue