Skip to content

Commit

Permalink
Merge pull request #1152 from dbauszus-glx/mapview-render-complete
Browse files Browse the repository at this point in the history
promise renderComplete from addLayer
  • Loading branch information
dbauszus-glx authored Feb 27, 2024
2 parents b80fc79 + 9152fdb commit 88e2fd2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/mapview/addLayer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,11 @@ export default async function (layers) {
layer.display && layer.show();
}

// Will resolve once the map has completed render.
this.renderComplete = new Promise(resolve => {

this.Map.once('rendercomplete', resolve)
})

return layers;
}

0 comments on commit 88e2fd2

Please sign in to comment.