Skip to content

Commit

Permalink
simplify example
Browse files Browse the repository at this point in the history
  • Loading branch information
bdon committed Sep 28, 2023
1 parent 2d2fe4b commit 95f9694
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions js/examples/maplibre.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,7 @@

let PMTILES_URL = "https://protomaps.github.io/PMTiles/protomaps(vector)ODbL_firenze.pmtiles";

const p = new pmtiles.PMTiles(PMTILES_URL) // for short

// Alternative for setting custom headers:
// const headers = new Headers();
// const fetchSource = new pmtiles.FetchSource(PMTILES_URL, headers);
// const p = new pmtiles.PMTiles(fetchSource);
const p = new pmtiles.PMTiles(PMTILES_URL);

// this is so we share one instance across the JS code and the map renderer
protocol.add(p);
Expand Down

0 comments on commit 95f9694

Please sign in to comment.