forked from MapComplete/MapComplete
Performance improvements, add clock
This commit is contained in:
parent
c2b1f6643b
commit
efd7631837
21 changed files with 2947 additions and 105 deletions
|
|
@ -96,17 +96,20 @@ export class UpdateFromOverpass {
|
|||
const self = this;
|
||||
|
||||
self.retries.setData(0);
|
||||
|
||||
|
||||
let newIds = 1;
|
||||
for (const feature of geojson.features) {
|
||||
if(feature.properties.id === undefined){
|
||||
feature.properties.id = "ext/"+newIds;
|
||||
if (feature.properties.id === undefined) {
|
||||
feature.properties.id = "ext/" + newIds;
|
||||
newIds++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
geojson.features.forEach(feature => {
|
||||
State.state.allElements.addElement(feature);
|
||||
})
|
||||
MetaTagging.addMetatags(geojson.features);
|
||||
|
||||
|
||||
function renderLayers(layers: FilteredLayer[]) {
|
||||
if (layers.length === 0) {
|
||||
self.runningQuery.setData(false);
|
||||
|
|
@ -125,6 +128,7 @@ export class UpdateFromOverpass {
|
|||
}, 50)
|
||||
}
|
||||
|
||||
|
||||
renderLayers(State.state.filteredLayers.data);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue