urbica/tessella

Double slashes in tiles url when map using index.json

Opened this issue · 0 comments

The cause of the error:

const tilesUrl = url.format({ protocol, host, pathname });

tilesUrl //=>http://localhost:4000/\{z}\{x}\{y}.pbf

When a tile is downloaded, a url is incorrect and it looks that way:

http://localhost:4000//12/2311/1371.pbf
http://localhost:4000//12/2311/1370.pbf

instead

http://localhost:4000/12/2311/1371.pbf
http://localhost:4000/12/2311/1370.pbf