Skip to content

Commit

Permalink
Merge branch 'main' into peru
Browse files Browse the repository at this point in the history
  • Loading branch information
whubsch authored Jan 16, 2025
2 parents 6f8637b + 1868338 commit 7a8dcbf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/hillshade_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export class HillshadeControl {

this._button = document.createElement("button");
this._button.className = "maplibregl-ctrl-terrain";
this._updateButton();
Promise.resolve(map.loaded() || map.once("load")).then(() =>
this._updateButton()
);
this._button.addEventListener("click", this._onClick);
this._container.append(this._button);

Expand Down

0 comments on commit 7a8dcbf

Please sign in to comment.