Open qubiack opened 3 years ago
Unsure if this is the issue, but your config.json
file has the style name 'dioniso' and your url path has 'dionisios' (with an 's' at the end). If this is the issue can you share how you use config.json because I haven't found a way to do it. In fact, I am still unsure how to use config.json
to get the tileserver to start with a style different than basic-preview. I am using make start-tileserver
from openmaptiles to create a docker container. Have you been able to do this?
However, I have been able to add my own styles, sprites and glyphs using this method.
I pretty much just copy the sprite sheet into the server and then just restart the server.
copy sprite sheets:
docker cp sprite.json [container_id]:/app/node_modules/tileserver-gl-styles/sprites/dioniso/sprite.json
I think you need to also add sprite.png
, sprite@2x.json
, and sprite@2x.png
.
After this just restart the docker container. Also make sure your sprite path is correct in style.json
. If you put it in the same path that I did, then you just need to have "sprite": "sprites/custom_night/sprite"
.
It should now be accessible at http://localhost:8080/styles/dionisos/sprite.json
. or on whatever port you are using.
-Andres
I have 4 files - sprites - 2 png and 2 JSON files, but it's I suppose impossible to configure it as expected. The documentation for Tileserver-gl is really poor in this aspect - there is some information about sprites but no information on how we define access for them or any dir structure to show an example.
Yeah, the documentation is not very clear how it should be done. However, I think the method from #530 should work. I have been able to add my own sprites in this way. How does your style.json
look?
In the documentation, I found information that we can add some sprites files but I can't attach them directly to style. I would like to have access to sprites with links like
http://localhost:4800/styles/dionisos/sprite
so for example:http://localhost:4800/styles/dionisos/sprite.json
It's possible to attach files directly to style? How can I do that?