Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Sprite images? #1345

Open
markdavieswlt opened this issue Aug 5, 2024 · 3 comments
Open

Missing Sprite images? #1345

markdavieswlt opened this issue Aug 5, 2024 · 3 comments

Comments

@markdavieswlt
Copy link

I've used the docker installation to load the tileserver which works well, and I can view the maps etc

docker run --rm -it -v /docker-sets/maps:/data -p 8080:8080 maptiler/tileserver-gl --file planet.mbtiles --verbose

But when I view the developer toolbar, I see lots of "missing" errors in the console window

i.e. when loading the URL
:8080/styles/osm-bright/#17.23/-34.103519/18.81684

I get around 10 "missing" messages:

util.ts:267 Image "gate_11" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.

Is this a problem with the docker command, or something I've missed?

@acalcutt
Copy link
Collaborator

acalcutt commented Aug 5, 2024

That error in the console doesn't necessarily indicate an issue, bit it does mean there is no matching sprite found that your style asked for. You could have a working sprite sheet an not have every spite the style asks for.

For example, osm-bright only includes these icons
https://github.com/openmaptiles/osm-bright-gl-style/tree/master/icons
if you look at sprites.json in the release there is no "gate_11" in there.

However the reason you see that warning, is because in style.json there is something like this layer "poi-level-3", which asks for icons like
"icon-image": "{class}_11",
notice it is using the class for the name of the icon, but in your example, the class would be 'gate', which doesn't exist in the given sprites.

In my own project I ended up trying to add a lot of those missing icons
https://github.com/acalcutt/icon-fonts , which look like
https://github.com/acalcutt/wifidb-tileserver-gl/blob/master/tileserver-gl/styles/WDB_OSM/sprite.json#L979
https://github.com/acalcutt/wifidb-tileserver-gl/blob/master/tileserver-gl/styles/WDB_OSM/sprite.png

@markdavieswlt
Copy link
Author

Thanks
I'm actually using osm-liberty, and it has the same issue,
As that isn't included in the default docker setup, I used the osm-bright example

Does anyone know if there is are definitive sprite json/png files I can use that will show everything requested?

@acalcutt
Copy link
Collaborator

acalcutt commented Aug 6, 2024

Not that I am aware of. My sprites probably come the closest because I actually tried to add all the icons that I saw were missing in the console errors you mentioned. You are welcome to download the spite files from my theme at https://github.com/acalcutt/wifidb-tileserver-gl/tree/master/tileserver-gl/styles/WDB_OSM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants