forked from MapComplete/MapComplete
		
	removed geojson
This commit is contained in:
		
							parent
							
								
									4d0f0e55f2
								
							
						
					
					
						commit
						d5b614fc44
					
				
					 88 changed files with 1835 additions and 4874 deletions
				
			
		|  | @ -1,21 +0,0 @@ | |||
| import {SubtleButton} from "../Base/SubtleButton"; | ||||
| import Svg from "../../Svg"; | ||||
| import Translations from "../i18n/Translations"; | ||||
| import State from "../../State"; | ||||
| import {FeatureSourceUtils} from "../../Logic/FeatureSource/FeatureSource"; | ||||
| import {Utils} from "../../Utils"; | ||||
| import Combine from "../Base/Combine"; | ||||
| 
 | ||||
| export class ExportDataButton extends Combine { | ||||
|     constructor() { | ||||
|         const t = Translations.t.general.download | ||||
|         const button = new SubtleButton(Svg.floppy_ui(), t.downloadGeojson.Clone().SetClass("font-bold")) | ||||
|             .onClick(() => { | ||||
|                 const geojson = FeatureSourceUtils.extractGeoJson(State.state.featurePipeline) | ||||
|                 const name = State.state.layoutToUse.data.id; | ||||
|                 Utils.offerContentsAsDownloadableFile(JSON.stringify(geojson), `MapComplete_${name}_export_${new Date().toISOString().substr(0,19)}.geojson`); | ||||
|             }) | ||||
|          | ||||
|         super([button, t.licenseInfo.Clone().SetClass("link-underline")]) | ||||
|     } | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue