generated from Grigo/AndroidTemplate
fix proxy
This commit is contained in:
@@ -547,6 +547,7 @@
|
|||||||
let apiDebugTxMarker = null;
|
let apiDebugTxMarker = null;
|
||||||
let apiDebugRxMarker = null;
|
let apiDebugRxMarker = null;
|
||||||
let apiDebugLineLayer = null;
|
let apiDebugLineLayer = null;
|
||||||
|
let apiDebugBeamLayer = null;
|
||||||
let apiDebugCursorDist = null;
|
let apiDebugCursorDist = null;
|
||||||
let apiDebugCursorMarker = null;
|
let apiDebugCursorMarker = null;
|
||||||
let apiDebugGroundProfile = null;
|
let apiDebugGroundProfile = null;
|
||||||
@@ -2201,6 +2202,41 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearApiDebugBeam() {
|
||||||
|
if (apiDebugBeamLayer) {
|
||||||
|
map.removeLayer(apiDebugBeamLayer);
|
||||||
|
apiDebugBeamLayer = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderApiDebugBeam(data) {
|
||||||
|
const feature = data?.geojson || data;
|
||||||
|
if (!feature?.geometry) {
|
||||||
|
apiDebugSetSummary('Ответ antenna/beam не содержит GeoJSON geometry.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
clearApiDebugBeam();
|
||||||
|
apiDebugBeamLayer = L.geoJSON(feature, {
|
||||||
|
style: {
|
||||||
|
color: '#ff9800',
|
||||||
|
weight: 2,
|
||||||
|
opacity: 0.95,
|
||||||
|
fillColor: '#ff9800',
|
||||||
|
fillOpacity: 0.22
|
||||||
|
}
|
||||||
|
}).addTo(map);
|
||||||
|
const props = feature.properties || {};
|
||||||
|
const bounds = apiDebugBeamLayer.getBounds();
|
||||||
|
if (bounds.isValid()) {
|
||||||
|
setMapViewProgrammatically(() => map.fitBounds(bounds, { padding: [40, 40], maxZoom: 15 }));
|
||||||
|
}
|
||||||
|
apiDebugSetSummary(
|
||||||
|
`<b>Сектор антенны:</b> ${escapeHtml(props.pattern || 'sector')} · ` +
|
||||||
|
`azimuth ${fmtNum(props.azimuth_deg, 0, '°')} · radius ${fmtNum(props.radius_m, 0, ' m')}<br>` +
|
||||||
|
`Оранжевая заливка на карте — зона сектора из GeoJSON ответа.`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function clearApiDebugCursorMarker() {
|
function clearApiDebugCursorMarker() {
|
||||||
if (apiDebugCursorMarker) {
|
if (apiDebugCursorMarker) {
|
||||||
map.removeLayer(apiDebugCursorMarker);
|
map.removeLayer(apiDebugCursorMarker);
|
||||||
@@ -2318,6 +2354,7 @@
|
|||||||
if (el) el.value = '';
|
if (el) el.value = '';
|
||||||
});
|
});
|
||||||
refreshApiDebugOverlay();
|
refreshApiDebugOverlay();
|
||||||
|
clearApiDebugBeam();
|
||||||
clearApiDebugCursorMarker();
|
clearApiDebugCursorMarker();
|
||||||
apiDebugGroundProfile = null;
|
apiDebugGroundProfile = null;
|
||||||
apiDebugSurfaceProfile = null;
|
apiDebugSurfaceProfile = null;
|
||||||
@@ -2514,6 +2551,7 @@
|
|||||||
else if (kind === 'los') apiDebugSetSummary(formatApiDebugLosSummary(data));
|
else if (kind === 'los') apiDebugSetSummary(formatApiDebugLosSummary(data));
|
||||||
else if (kind === 'budget') apiDebugSetSummary(formatApiDebugBudgetSummary(data));
|
else if (kind === 'budget') apiDebugSetSummary(formatApiDebugBudgetSummary(data));
|
||||||
else if (kind === 'elevation') apiDebugSetSummary(formatApiDebugPointSummary(data));
|
else if (kind === 'elevation') apiDebugSetSummary(formatApiDebugPointSummary(data));
|
||||||
|
else if (kind === 'beam') renderApiDebugBeam(data);
|
||||||
else apiDebugSetSummary('Ответ получен.');
|
else apiDebugSetSummary('Ответ получен.');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
apiDebugSetStatus(`Ошибка запроса: ${e.message || e}`, true);
|
apiDebugSetStatus(`Ошибка запроса: ${e.message || e}`, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user