forked from MapComplete/MapComplete
chore: automated housekeeping...
This commit is contained in:
parent
ebc48f6b53
commit
e7de94576f
232 changed files with 11430 additions and 3365 deletions
|
|
@ -5,7 +5,7 @@ import { BBox } from "../BBox"
|
|||
import osmtogeojson from "osmtogeojson"
|
||||
import { Feature, FeatureCollection } from "geojson"
|
||||
|
||||
("use strict")
|
||||
;("use strict")
|
||||
/**
|
||||
* Interfaces overpass to get all the latest data
|
||||
*/
|
||||
|
|
@ -37,7 +37,9 @@ export class Overpass {
|
|||
this._includeMeta = includeMeta
|
||||
}
|
||||
|
||||
public async queryGeoJson<T extends Feature>(bounds: BBox): Promise<[{ features: T[] } & FeatureCollection, Date]> {
|
||||
public async queryGeoJson<T extends Feature>(
|
||||
bounds: BBox
|
||||
): Promise<[{ features: T[] } & FeatureCollection, Date]> {
|
||||
const bbox =
|
||||
"[bbox:" +
|
||||
bounds.getSouth() +
|
||||
|
|
@ -73,7 +75,7 @@ export class Overpass {
|
|||
console.warn("No features for", this.buildUrl(query))
|
||||
}
|
||||
|
||||
const geojson = <{ features: T[] } & FeatureCollection><any>osmtogeojson(json)
|
||||
const geojson = <{ features: T[] } & FeatureCollection>(<any>osmtogeojson(json))
|
||||
const osmTime = new Date(json.osm3s.timestamp_osm_base)
|
||||
return [geojson, osmTime]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue