Finish refactoring

This commit is contained in:
Pieter Vander Vennet 2021-10-15 13:43:11 +02:00
parent eff6b5bfad
commit 71285d34cd
3 changed files with 9 additions and 12 deletions

View file

@ -68,13 +68,10 @@ export default class GeoJsonSource implements FeatureSourceForLayer, Tiled {
const self = this;
Utils.downloadJson(url)
.then(json => {
if(json.elements === undefined || json.elements === null){
return;
}
if (json.elements === [] && json.remarks.indexOf("runtime error") > 0) {
self.onFail("Runtime error (timeout)", url)
if(json.features === undefined || json.features === null){
return;
}
const time = new Date();
const newFeatures: { feature: any, freshness: Date } [] = []
let i = 0;