forked from MapComplete/MapComplete
		
	Attempt to get script working
This commit is contained in:
		
							parent
							
								
									1fadc5d7fe
								
							
						
					
					
						commit
						aad1a461d3
					
				
					 3 changed files with 11 additions and 3 deletions
				
			
		|  | @ -300,6 +300,9 @@ class GenerateLayouts extends Script { | |||
|                 if (url.endsWith(".pmtiles")) { | ||||
|                     continue | ||||
|                 } | ||||
|                 try{ | ||||
| 
 | ||||
|                 console.log("Downloading ", url) | ||||
|                 const styleSpec = await Utils.downloadJsonCached(url, 1000 * 120, { | ||||
|                     Origin: "https://mapcomplete.org", | ||||
|                 }) | ||||
|  | @ -324,6 +327,10 @@ class GenerateLayouts extends Script { | |||
|                 urls.push(...(styleSpec["tiles"] ?? [])) | ||||
|                 urls.push(styleSpec["sprite"]) | ||||
|                 urls.push(styleSpec["glyphs"]) | ||||
|                 }catch (e) { | ||||
|                     console.error("ERROR: could not download a resource, some sprites might not be whitelisted and thus not load") | ||||
|                 } | ||||
| 
 | ||||
|             } | ||||
|         } | ||||
|         this.eliUrlsCached = urls | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue