Skip to content

Commit

Permalink
Fix debug hillshade infinite loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentao-Kuang committed Oct 18, 2024
1 parent a61b652 commit 8aa970f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/landing/src/components/debug.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,12 @@ export class Debug extends Component<{ map: maplibregl.Map }, DebugState> {
if (currentLayer) map.removeLayer(HillShadeLayerId);
return;
}
if (currentLayer?.source === sourceId) return;

const hillShadeSourceId = `${HillShadePrefix}${sourceId}`;
if (currentLayer?.source === hillShadeSourceId) return;

// Hillshading from an existing raster-dem source gives very mixed results and looks very blury
// so add a new source layer to generate from
const hillShadeSourceId = `${HillShadePrefix}${sourceId}`;
const existingSource = map.getSource(hillShadeSourceId);
if (existingSource == null) {
const source = map.getSource(sourceId);
Expand Down

0 comments on commit 8aa970f

Please sign in to comment.