forked from MapComplete/MapComplete
Small fixes
This commit is contained in:
parent
b7c6861484
commit
d3f84d51ac
2 changed files with 8 additions and 3 deletions
|
@ -180,14 +180,19 @@ export default class OverpassFeatureSource implements FeatureSource {
|
||||||
}
|
}
|
||||||
} while (data === undefined && this._isActive.data);
|
} while (data === undefined && this._isActive.data);
|
||||||
|
|
||||||
self.retries.setData(0);
|
|
||||||
try {
|
try {
|
||||||
|
if(data === undefined){
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
data.features.forEach(feature => SimpleMetaTagger.objectMetaInfo.applyMetaTagsOnFeature(feature, date, undefined));
|
data.features.forEach(feature => SimpleMetaTagger.objectMetaInfo.applyMetaTagsOnFeature(feature, date, undefined));
|
||||||
self.features.setData(data.features.map(f => ({feature: f, freshness: date})));
|
self.features.setData(data.features.map(f => ({feature: f, freshness: date})));
|
||||||
return [bounds, date, layersToDownload];
|
return [bounds, date, layersToDownload];
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Got the overpass response, but could not process it: ", e, e.stack)
|
console.error("Got the overpass response, but could not process it: ", e, e.stack)
|
||||||
|
return undefined
|
||||||
} finally {
|
} finally {
|
||||||
|
self.retries.setData(0);
|
||||||
self.runningQuery.setData(false);
|
self.runningQuery.setData(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,9 +113,9 @@ export default class SimpleAddUI extends Toggle {
|
||||||
new Toggle(
|
new Toggle(
|
||||||
new Toggle(
|
new Toggle(
|
||||||
new Toggle(
|
new Toggle(
|
||||||
addUi,
|
|
||||||
Translations.t.general.add.stillLoading.Clone().SetClass("alert"),
|
Translations.t.general.add.stillLoading.Clone().SetClass("alert"),
|
||||||
state.featurePipeline.somethingLoaded
|
addUi,
|
||||||
|
state.featurePipeline.runningQuery
|
||||||
),
|
),
|
||||||
Translations.t.general.add.zoomInFurther.Clone().SetClass("alert"),
|
Translations.t.general.add.zoomInFurther.Clone().SetClass("alert"),
|
||||||
state.locationControl.map(loc => loc.zoom >= Constants.userJourney.minZoomLevelToAddNewPoints)
|
state.locationControl.map(loc => loc.zoom >= Constants.userJourney.minZoomLevelToAddNewPoints)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue