Closed boonboonsiri closed 1 year ago
You are right, static images don't have attribution.
In Vector view, TileJSON gets passed to maplibre-gl-js and it displays the attribution. In Raster view, maplibre-native does the rendering but leaflet is showing the attribution based on the TileJSON
In Static view however, Maplibre-Native is making the image and tileserver-gl is passing it back to the user. Maplibre-Native processes the TileJSON, but it doesn't include anything to display the attibution.
An workaround right now might be to use WATERMARK, which looks something like
You could also read the tilejson for the style and display it in your own app, but that is a bit of a pain.
If we were to add attribution to static imges, we could possibly add code similar to watermark, which would draw the text over the image maplibre-native generates. https://github.com/maptiler/tileserver-gl/blob/master/src/serve_rendered.js#L760-L771
Ah okay okay yeah I'm open to many ideas. Just want to attribute everyone correctly.
If this PR satisfies your needs then I think this issue is good
Do you have any opinion on https://github.com/maptiler/tileserver-gl/pull/1005 ? do you think that would fix your needs. I plan to approve it, but like to hear what people think.
Issue
I'm not sure if this is intentional, but the attributions (bottom right) doesn't show up for generated raster tiles. They show up in both the
tilejson
and leaflet map demo but doesn't show up for the actual rendered raster image.Config used looks something like this
Reproduce
the default attribution also doesn't show up, not just the custom attribution and can be reproduced like this
and then the generated tile image has no attribution
About
Macos: 13.5.1 Docker: 4.24.0 TileserverGL: 4.5.1