forked from MapComplete/MapComplete
refactoring(maplibre): WIP
This commit is contained in:
parent
231d67361e
commit
4d48b1cf2b
89 changed files with 1166 additions and 3973 deletions
|
@ -1,4 +1,3 @@
|
|||
import State from "../../State"
|
||||
import { Utils } from "../../Utils"
|
||||
import { BBox } from "../BBox"
|
||||
|
||||
|
@ -14,8 +13,8 @@ export interface GeoCodeResult {
|
|||
export class Geocoding {
|
||||
private static readonly host = "https://nominatim.openstreetmap.org/search?"
|
||||
|
||||
static async Search(query: string): Promise<GeoCodeResult[]> {
|
||||
const b = State?.state?.currentBounds?.data ?? BBox.global
|
||||
static async Search(query: string, bbox: BBox): Promise<GeoCodeResult[]> {
|
||||
const b = bbox ?? BBox.global
|
||||
const url =
|
||||
Geocoding.host +
|
||||
"format=json&limit=1&viewbox=" +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue