helper/has_location: validate coordinates (+-90, +-180)
This commit is contained in:
parent
020ab2aef5
commit
9bdb7c562a
@ -84,7 +84,9 @@ function online(d) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function has_location(d) {
|
function has_location(d) {
|
||||||
return "location" in d.nodeinfo
|
return "location" in d.nodeinfo &&
|
||||||
|
Math.abs(d.nodeinfo.location.latitude) < 90 &&
|
||||||
|
Math.abs(d.nodeinfo.location.longitude) < 180
|
||||||
}
|
}
|
||||||
|
|
||||||
function subtract(a, b) {
|
function subtract(a, b) {
|
||||||
|
Loading…
Reference in New Issue
Block a user