Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created June 29, 2020 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/cfb914bdb40f432d6400ef53c0dd18e6 to your computer and use it in GitHub Desktop.
Save tmcw/cfb914bdb40f432d6400ef53c0dd18e6 to your computer and use it in GitHub Desktop.
const [map, geojson] = await Promise.all([
new Promise((resolve) => map.on("load", () => resolve(map))),
fetch("foo.json").then((r) => r.json()),
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment