Stabilize popup

This commit is contained in:
Pieter Vander Vennet 2021-05-07 01:43:32 +02:00
parent 729f28fbf5
commit 292bad5df7
6 changed files with 74 additions and 45 deletions

View file

@ -22,10 +22,8 @@ export default class OsmApiFeatureSource implements FeatureSource {
public load(id: string) {
console.log("Updating from OSM API: ", id)
OsmObject.DownloadObject(id, (element, meta) => {
const geojson = element.asGeoJson();
console.warn(geojson)
geojson.id = geojson.properties.id;
this.features.setData([{feature: geojson, freshness: meta["_last_edit:timestamp"]}])
})