I sliced an image into XYZ tiles using the gdal2tiles command-line tool. The map loads fine and all the expected tiles are in working order, however there are two problems (probably related):
- The {z}/{x}/{y} format is making a bunch of requests to tiles that don't exist.
- I can't seem to accurately center the map or its extent (so that I can prevent panning off the map).
I am attempting to use fit() first so that the map is fully visible, and then on('change:resolution') updating the extent to prevent panning beyond the edges of the map (not working at the moment)
The code comes in around 200 lines, so I'll leave links below
I tried setting up a JSFiddle but couldn't get it to work.. Alternatively, you can look at the live demo or clone the repo, which should work fine.
Live Demo: https://dndiaries.netlify.com/faerun Repo: https://gitlab.com/heartofcode/swamptrek
No error messages, but the "center" is off-center of the rendered map