Skip to content

Commit

Permalink
fixed typo
Browse files Browse the repository at this point in the history
Signed-off-by: Abel Vázquez Montoro <abel.vm@gmail.com>
  • Loading branch information
AbelVM committed Oct 22, 2024
1 parent 9def7d3 commit 636596f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ init(maplibregl);

const protocol = new pmtiles.Protocol();
maplibregl.addProtocol('pmtiles', protocol.tile);
const PMTILES_URL = location.href.replace('index.html', 'assets/cotas.pmtiles');
const PMTILES_URL = (location.href.indexOf('index.html') == -1) ? location.href + 'assets/cotas.pmtiles' : location.href.replace('index.html', 'assets/cotas.pmtiles');
const p = new pmtiles.PMTiles(PMTILES_URL);
protocol.add(p);
p.getHeader().then(h => {
Expand Down

0 comments on commit 636596f

Please sign in to comment.