forked from MapComplete/MapComplete
		
	Refactoring: introduction of global state to simplify getting common objects
This commit is contained in:
		
							parent
							
								
									afaaaaadb1
								
							
						
					
					
						commit
						004eead4ee
					
				
					 34 changed files with 532 additions and 506 deletions
				
			
		|  | @ -1,14 +1,14 @@ | |||
| import {Basemap} from "../Leaflet/Basemap"; | ||||
| import $ from "jquery" | ||||
| import {State} from "../../State"; | ||||
| export class Geocoding { | ||||
| 
 | ||||
|     private static readonly host = "https://nominatim.openstreetmap.org/search?"; | ||||
| 
 | ||||
|     static Search(query: string, | ||||
|                   basemap: Basemap, | ||||
|                   handleResult: ((places: { display_name: string, lat: number, lon: number, boundingbox: number[] }[]) => void), | ||||
|                   onFail: (() => void)) { | ||||
|         const b = basemap.map.getBounds(); | ||||
|         const b = State.state.bm.map.getBounds(); | ||||
|         console.log(b); | ||||
|         $.getJSON( | ||||
|             Geocoding.host + "format=json&limit=1&viewbox=" +  | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue