Check subscriptions params
This commit is contained in:
parent
96c524a90c
commit
26cfadb8da
1 changed files with 9 additions and 2 deletions
|
|
@ -55,8 +55,15 @@ const subsUnion = (union, options) => {
|
||||||
parts: 144
|
parts: 144
|
||||||
};
|
};
|
||||||
options.subs.forEach((sub) => {
|
options.subs.forEach((sub) => {
|
||||||
const circle = LGeo.circle([sub.location.lat, sub.location.lon], sub.distance * 1000, copts);
|
if (sub.location && sub.location.lat && sub.location.lon && sub.distance) {
|
||||||
circle.addTo(unionGroup);
|
check(sub.location.lon, Number);
|
||||||
|
check(sub.location.lat, Number);
|
||||||
|
check(sub.distance, Number);
|
||||||
|
const circle = LGeo.circle([sub.location.lat, sub.location.lon], sub.distance * 1000, copts);
|
||||||
|
circle.addTo(unionGroup);
|
||||||
|
} else {
|
||||||
|
console.error(`Wrong subscription ${JSON.stringify(sub)}`);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
const unionJson = unify(unionGroup.getLayers());
|
const unionJson = unify(unionGroup.getLayers());
|
||||||
union = L.geoJson(unionJson);
|
union = L.geoJson(unionJson);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue