forked from MapComplete/MapComplete
		
	Fix mapillary links
This commit is contained in:
		
							parent
							
								
									a2aa26aafc
								
							
						
					
					
						commit
						7566a6d046
					
				
					 4 changed files with 19 additions and 13 deletions
				
			
		
							
								
								
									
										11
									
								
								Utils.ts
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								Utils.ts
									
										
									
									
									
								
							|  | @ -481,5 +481,16 @@ export class Utils { | |||
|         }, false); | ||||
| 
 | ||||
|     } | ||||
|      | ||||
|     public static OsmChaLinkFor(daysInThePast, theme = undefined) : string { | ||||
|         const now = new Date() | ||||
|         const lastWeek = new Date(now.getTime() - daysInThePast * 24 * 60 * 60 * 1000) | ||||
|         const date = lastWeek.getFullYear() + "-" + Utils.TwoDigits(lastWeek.getMonth() + 1) + "-" + Utils.TwoDigits(lastWeek.getDate()) | ||||
|         let osmcha_link = `{"date__gte":[{"label":"${date}","value":"${date}"}],"editor":[{"label":"mapcomplete","value":"mapcomplete"}]}` | ||||
|         if(theme !== undefined){ | ||||
|             osmcha_link = osmcha_link + "," + `{"comment":[{"label":"#${theme}","value":"#${theme}"}]` | ||||
|         } | ||||
|         return  "https://osmcha.org/?filters="+ encodeURIComponent(osmcha_link) | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue