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,11 +304,13 @@ new Server(2345, { ignorePathPrefix: ["summary"] }, [
|
|||
Tiles.tile_index(Number(z), Number(x), Number(y))
|
||||
)
|
||||
|
||||
properties[layer] = count.count
|
||||
if (count.count !== 0) {
|
||||
latSum += count.lat * count.count
|
||||
lonSum += count.lon * count.count
|
||||
properties[layer] = count.count
|
||||
sum += count.count
|
||||
}
|
||||
}
|
||||
|
||||
properties["lon"] = lonSum / sum
|
||||
properties["lat"] = latSum / sum
|
||||
|
|
Loading…
Reference in a new issue