Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update js/examples/maplibre.html #383

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paulovieira
Copy link

Some small changes to make the this important example more clear:

  • wrap all the code in an async function, so that we can use await p.getHeader()
  • some small changes for coherence (double quotes, etc)

If there is interest I can make these same changes in the other 2 examples (maplibre_raster_dem.html and leaflet.html)

Some small changes to make the this important example more clear:
- wrap all the code in an async function, so that we can use `await p.getHeader()`
- some small changes for coherence (double quotes, etc)

If there is interest I can make these same changes in the other 2 examples (maplibre_raster_dem.html and leaflet.html)
@bdon
Copy link
Member

bdon commented Apr 14, 2024

I don't view using await as inherently more correct than using .then() in this context of a simple script using the IIFE script-includes. Is there another reason why this would be better?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants