Skip to content

Commit

Permalink
Ensure hillshade source is loaded.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentao-Kuang committed Jul 17, 2024
1 parent 7cac2a8 commit 0eef2ca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/landing/src/components/debug.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ export class Debug extends Component<{ map: maplibregl.Map }, DebugState> {

if (Config.map.debug['debug.screenshot']) {
async function addLoadedDiv(): Promise<void> {
if (!map.loaded()) return;
// Ensure hillshade source is loaded
if (Config.map.debug['debug.hillshade']) {
if (!map.isSourceLoaded(`${HillShadePrefix}${Config.map.debug['debug.hillshade']}`)) return;
}
// Ensure the attribution data has loaded
await MapAttrState.getCurrentAttribution();
await new Promise((r) => setTimeout(r, 250));
Expand Down

0 comments on commit 0eef2ca

Please sign in to comment.