max size for suspicious stations

This commit is contained in:
Tykayn 2024-12-31 22:44:33 +01:00 committed by tykayn
parent 725c6eff2f
commit 7100bc1d52
2 changed files with 7 additions and 0 deletions

View File

@ -3,6 +3,7 @@ const config = {
showHighPower : true, showHighPower : true,
overrideQuery : true, overrideQuery : true,
initialZoom : 12, initialZoom : 12,
max_possible_station_output : 400,
tileServers:{ tileServers:{
osm : 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', osm : 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
cycle : 'https://{s}.tile.thunderforest.org/{z}/{x}/{y}.png', cycle : 'https://{s}.tile.thunderforest.org/{z}/{x}/{y}.png',

View File

@ -8,6 +8,7 @@ import config from './config.js'
import utils from './utils.js' import utils from './utils.js'
import colorUtils from './color-utils.js' import colorUtils from './color-utils.js'
import { sendToJOSM, createJOSMEditLink } from './editor.js' import { sendToJOSM, createJOSMEditLink } from './editor.js'
import {isContentEditable} from "@testing-library/user-event/dist/utils";
let geojsondata; let geojsondata;
let lastLatLng; let lastLatLng;
@ -402,6 +403,11 @@ function eachFeature(feature, layer) {
if (!outPowerGuessed) { if (!outPowerGuessed) {
radius = radius * ratio_circle; radius = radius * ratio_circle;
} else { } 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; radius = outPowerGuessed * ratio_circle;
} }