forked from MapComplete/MapComplete
		
	Add caching to geojson source
This commit is contained in:
		
							parent
							
								
									7c6e292013
								
							
						
					
					
						commit
						859a694723
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -79,7 +79,7 @@ export default class GeoJsonSource implements FeatureSourceForLayer, Tiled {
 | 
				
			||||||
    private LoadJSONFrom(url: string) {
 | 
					    private LoadJSONFrom(url: string) {
 | 
				
			||||||
        const eventSource = this.features;
 | 
					        const eventSource = this.features;
 | 
				
			||||||
        const self = this;
 | 
					        const self = this;
 | 
				
			||||||
        Utils.downloadJson(url)
 | 
					        Utils.downloadJsonCached(url, 60 * 60)
 | 
				
			||||||
            .then(json => {
 | 
					            .then(json => {
 | 
				
			||||||
                self.state.setData("loaded")
 | 
					                self.state.setData("loaded")
 | 
				
			||||||
                if (json.features === undefined || json.features === null) {
 | 
					                if (json.features === undefined || json.features === null) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue