forked from MapComplete/MapComplete
		
	Small fixes to the UK-addresses theme
This commit is contained in:
		
							parent
							
								
									285ca2e508
								
							
						
					
					
						commit
						e47224ecb8
					
				
					 2 changed files with 20 additions and 9 deletions
				
			
		|  | @ -134,11 +134,18 @@ export class ExtraFunction { | |||
|             args: ["list of features or layer name", "amount of features", "unique tag key (optional)", "maxDistanceInMeters (optional)"] | ||||
|         }, | ||||
|         (params, feature) => { | ||||
|             return (features, amount, uniqueTag, maxDistanceInMeters) => ExtraFunction.GetClosestNFeatures(params, feature, features, { | ||||
|                 maxFeatures: Number(amount), | ||||
|                 uniqueTag: uniqueTag, | ||||
|                 maxDistance: Number(maxDistanceInMeters) | ||||
|             }) | ||||
|             | ||||
|             return (features, amount, uniqueTag, maxDistanceInMeters) => { | ||||
|                 let distance : number = Number(maxDistanceInMeters) | ||||
|                 if(isNaN(distance)){ | ||||
|                     distance = undefined | ||||
|                 } | ||||
|                 return ExtraFunction.GetClosestNFeatures(params, feature, features, { | ||||
|                     maxFeatures: Number(amount), | ||||
|                     uniqueTag: uniqueTag, | ||||
|                     maxDistance: distance | ||||
|                 }); | ||||
|             } | ||||
|         } | ||||
|     ) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue