forked from MapComplete/MapComplete
		
	Chore: small cleanups
This commit is contained in:
		
							parent
							
								
									c2f7b1e8c1
								
							
						
					
					
						commit
						b30cb57615
					
				
					 1 changed files with 2 additions and 11 deletions
				
			
		| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
import { Map as MLMap, RasterSourceSpecification, VectorTileSource } from "maplibre-gl"
 | 
			
		||||
import { Store, Stores, UIEventSource } from "../../Logic/UIEventSource"
 | 
			
		||||
import { AvailableRasterLayers, RasterLayerPolygon } from "../../Models/RasterLayers"
 | 
			
		||||
import { RasterLayerPolygon } from "../../Models/RasterLayers"
 | 
			
		||||
import { RasterLayerProperties } from "../../Models/RasterLayerProperties"
 | 
			
		||||
import { Utils } from "../../Utils"
 | 
			
		||||
import { VectorSourceSpecification } from "@maplibre/maplibre-gl-style-spec"
 | 
			
		||||
| 
						 | 
				
			
			@ -88,7 +88,7 @@ class SingleBackgroundHandler {
 | 
			
		|||
            return
 | 
			
		||||
        }
 | 
			
		||||
        while (!map?.isStyleLoaded()) {
 | 
			
		||||
            await Utils.waitFor(250)
 | 
			
		||||
            await Utils.waitFor(100)
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -101,15 +101,6 @@ class SingleBackgroundHandler {
 | 
			
		|||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private tryEnableSafe(): boolean {
 | 
			
		||||
        try {
 | 
			
		||||
            return this.tryEnable()
 | 
			
		||||
        } catch (e) {
 | 
			
		||||
            console.log("Error: could not enable due to error", e)
 | 
			
		||||
            return false
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns 'false' if should be attempted again
 | 
			
		||||
     * @private
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue