Skip to content

Instantly share code, notes, and snippets.

@tmcw

tmcw/load.js

Created Jun 29, 2020
Embed
What would you like to do?
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