Work on automatically creating an import layer for every feature

This commit is contained in:
Pieter Vander Vennet 2022-01-14 13:58:37 +01:00
parent f67d0701b0
commit a65afbbb58
13 changed files with 165 additions and 8 deletions

View file

@ -3,7 +3,7 @@ import RelationsTracker from "./RelationsTracker";
import {Utils} from "../../Utils";
import {UIEventSource} from "../UIEventSource";
import {BBox} from "../BBox";
import osmtogeojson from "osmtogeojson";
import * as osmtogeojson from "osmtogeojson";
/**
* Interfaces overpass to get all the latest data
@ -52,7 +52,8 @@ export class Overpass {
}
self._relationTracker.RegisterRelations(json)
const geojson = osmtogeojson.toGeoJSON(json);
console.warn("OSMTOGEOJSON:", osmtogeojson)
const geojson = osmtogeojson.default(json);
const osmTime = new Date(json.osm3s.timestamp_osm_base);
return [geojson, osmTime];
}