forked from MapComplete/MapComplete
Fix null in coordinates
This commit is contained in:
parent
dc88d094c4
commit
049e712981
1 changed files with 5 additions and 3 deletions
|
@ -304,10 +304,12 @@ new Server(2345, { ignorePathPrefix: ["summary"] }, [
|
||||||
Tiles.tile_index(Number(z), Number(x), Number(y))
|
Tiles.tile_index(Number(z), Number(x), Number(y))
|
||||||
)
|
)
|
||||||
|
|
||||||
latSum += count.lat * count.count
|
|
||||||
lonSum += count.lon * count.count
|
|
||||||
properties[layer] = count.count
|
properties[layer] = count.count
|
||||||
sum += count.count
|
if (count.count !== 0) {
|
||||||
|
latSum += count.lat * count.count
|
||||||
|
lonSum += count.lon * count.count
|
||||||
|
sum += count.count
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
properties["lon"] = lonSum / sum
|
properties["lon"] = lonSum / sum
|
||||||
|
|
Loading…
Reference in a new issue