From 7100bc1d52262b511a8d66c7c9756efff8626363 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Tue, 31 Dec 2024 22:44:33 +0100 Subject: [PATCH] max size for suspicious stations --- js/config.js | 1 + js/main.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/js/config.js b/js/config.js index 632a579..aed0241 100644 --- a/js/config.js +++ b/js/config.js @@ -3,6 +3,7 @@ const config = { showHighPower : true, overrideQuery : true, initialZoom : 12, + max_possible_station_output : 400, tileServers:{ osm : 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', cycle : 'https://{s}.tile.thunderforest.org/{z}/{x}/{y}.png', diff --git a/js/main.js b/js/main.js index fc6c992..99643e6 100644 --- a/js/main.js +++ b/js/main.js @@ -8,6 +8,7 @@ import config from './config.js' import utils from './utils.js' import colorUtils from './color-utils.js' import { sendToJOSM, createJOSMEditLink } from './editor.js' +import {isContentEditable} from "@testing-library/user-event/dist/utils"; let geojsondata; let lastLatLng; @@ -402,6 +403,11 @@ function eachFeature(feature, layer) { if (!outPowerGuessed) { radius = radius * ratio_circle; } else { + if(outPowerGuessed> config.max_possible_station_output ){ + console.error("valeur suspecte outPowerGuessed",outPowerGuessed, feature) + outPowerGuessed = config.max_possible_station_output +1 + } + radius = outPowerGuessed * ratio_circle; }