PMTiles icon indicating copy to clipboard operation
PMTiles copied to clipboard

Update js/examples/maplibre.html

Open paulovieira opened this issue 1 year ago • 1 comments

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)

paulovieira avatar Apr 10 '24 16:04 paulovieira

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?

bdon avatar Apr 14 '24 22:04 bdon

Fixed formatting in #438 , thanks.

bdon avatar Sep 02 '24 06:09 bdon