diff --git a/src/data/localGeojsonCore.js b/src/data/localGeojsonCore.js index f1a4cdecc..18d3a9439 100644 --- a/src/data/localGeojsonCore.js +++ b/src/data/localGeojsonCore.js @@ -1610,6 +1610,8 @@ const fillItem = (record) => // browsers, whatever `stroke-width` says. outlineWidth: 1, height: 'absolute', + // The loader's entities drew a raised polygon lit by the sun. + lit: true, meta: record.carrier, show: record.visible, } diff --git a/src/data/localGeojsonDraw.test.mjs b/src/data/localGeojsonDraw.test.mjs index f52c86c89..31ddcec86 100644 --- a/src/data/localGeojsonDraw.test.mjs +++ b/src/data/localGeojsonDraw.test.mjs @@ -315,6 +315,8 @@ test('heights raise a polygon off the ground and stand a point’s pin on its ti const fill = env.fake.set('raised').items.get('p'); assert.equal(fill.height, 'absolute'); assert.equal(fill.geometry.perPositionHeight, true); + // Lit by the sun, as the loader's entities drew a raised polygon. + assert.equal(fill.lit, true); assert.equal(fill.geometry.rings[0][0].height, 100); assert.deepEqual(fill.outline, [0, 136 / 255, 1, 1]); const pin = env.fake.set('pins').items.get('pt'); diff --git a/src/data/telegeographySubmarineCables.test.mjs b/src/data/telegeographySubmarineCables.test.mjs index 870b5a925..6715db879 100644 --- a/src/data/telegeographySubmarineCables.test.mjs +++ b/src/data/telegeographySubmarineCables.test.mjs @@ -1272,6 +1272,7 @@ test('polygons and reference-less features draw as the GeoJSON loader drew them' // Heights keep a polygon off the ground, outlined in its stroke. assert.equal(fills[3].height, 'absolute'); assert.equal(fills[3].geometry.perPositionHeight, true); + assert.equal(fills[3].lit, true); assert.deepEqual(fills[3].outline, [0, 0, 1, 1]); assert.equal(fills[3].geometry.rings[0].length, 5); // A feature with no reference still draws, unpicked and with no reference. diff --git a/src/layers/submarineCables/rendering.js b/src/layers/submarineCables/rendering.js index 026ade8c8..0462d5026 100644 --- a/src/layers/submarineCables/rendering.js +++ b/src/layers/submarineCables/rendering.js @@ -277,6 +277,8 @@ export function createRendering({ state }) { // WebGL draws the loader's outline one pixel wide. outline: strokeColor(props, cable, baseColor), outlineWidth: 1, + // The loader's entities drew a raised polygon lit by the sun. + lit: true, } : { height: 'clampGround' }), show: true,