forked from MapComplete/MapComplete
		
	Add toggle to disable squares on low zoom levels, fix maxzoom property
This commit is contained in:
		
							parent
							
								
									6330bd5bfd
								
							
						
					
					
						commit
						9e7dec0101
					
				
					 5 changed files with 43 additions and 24 deletions
				
			
		|  | @ -153,13 +153,18 @@ export class TileHierarchyAggregator implements FeatureSource { | |||
|         } | ||||
|     } | ||||
|      | ||||
|     getCountsForZoom(locationControl: UIEventSource<{ zoom : number }>, cutoff: number = 0) : FeatureSource{ | ||||
|     getCountsForZoom(clusteringConfig: {maxZoom: number}, locationControl: UIEventSource<{ zoom : number }>, cutoff: number = 0) : FeatureSource{ | ||||
|         const self = this | ||||
|          | ||||
|         const empty = [] | ||||
|         return new StaticFeatureSource( | ||||
|             locationControl.map(loc => { | ||||
|                 const features = [] | ||||
|                 const targetZoom = loc.zoom | ||||
|                  | ||||
|                 if(targetZoom > clusteringConfig.maxZoom){ | ||||
|                     return empty | ||||
|                 } | ||||
|                  | ||||
|                 const features = [] | ||||
|                 self.visitSubTiles(aggr => { | ||||
|                     if(aggr.totalValue < cutoff) { | ||||
|                         return false | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue