forked from MapComplete/MapComplete
		
	Select point on minimap where to split
This commit is contained in:
		
							parent
							
								
									ae5325d4d1
								
							
						
					
					
						commit
						159e4d3350
					
				
					 6 changed files with 146 additions and 140 deletions
				
			
		|  | @ -273,6 +273,15 @@ export class GeoOperations { | |||
|         } | ||||
|         return undefined; | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * Generates the closest point on a way from a given point | ||||
|      * @param way The road on which you want to find a point | ||||
|      * @param point Point defined as [lon, lat] | ||||
|      */ | ||||
|     public static nearestPoint(way, point: [number, number]){ | ||||
|         return turf.nearestPointOnLine(way, point); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue