Skip to content

Commit 009ebfc

Browse files
CreatmanCEOclaude
andcommitted
fix: InterferenceLayer rendering — simplified paint, increased radius to 5km
Fixed line-dasharray + data-driven line-width incompatibility in MapLibre. Simplified to solid red lines, line-width: 3, opacity: 0.8. Increased interference radius from 2km to 5km for visibility at lower zoom levels. Verified: lines visible between wells in Sweihan, Al Khatim, Al Wathba clusters. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 25dbfce commit 009ebfc

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

frontend/src/components/Map/InterferenceLayer.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ interface Props {
99
wellsGeoJSON: WellsGeoJSON;
1010
}
1111

12-
const INTERFERENCE_RADIUS_KM = 2;
12+
const INTERFERENCE_RADIUS_KM = 5;
1313

1414
function haversineKm(lat1: number, lon1: number, lat2: number, lon2: number): number {
1515
const R = 6371;
@@ -55,19 +55,21 @@ export function InterferenceLayer({ wellsGeoJSON }: Props) {
5555
}
5656
}
5757

58-
return { type: "FeatureCollection", features };
58+
console.log(`InterferenceLayer: ${features.length} lines generated`);
59+
return { type: "FeatureCollection" as const, features };
5960
}, [wellsGeoJSON]);
6061

62+
if (linesGeoJSON.features.length === 0) return null;
63+
6164
return (
6265
<Source id="interference-lines" type="geojson" data={linesGeoJSON}>
6366
<Layer
6467
id="interference-lines-layer"
6568
type="line"
6669
paint={{
67-
"line-color": ["case", ["get", "both_active"], "#ef4444", "#9ca3af"],
68-
"line-width": ["get", "width"],
69-
"line-dasharray": [4, 3],
70-
"line-opacity": 0.6,
70+
"line-color": "#ef4444",
71+
"line-width": 3,
72+
"line-opacity": 0.8,
7173
}}
7274
/>
7375
</Source>

0 commit comments

Comments
 (0)