openstreetmap / iD

🆔 The easy-to-use OpenStreetMap editor in JavaScript.
https://www.openstreetmap.org/edit?editor=id
ISC License
3.37k stars 1.21k forks source link

Transparency of PNG image is rendered as black #1983

Closed GoldenCompass closed 10 years ago

GoldenCompass commented 10 years ago

Hi, While rendering TMS tiles which are in PNG, it is rendering portion of no data (transparent) as black on the map. For example if half of a tile is having data to be rendered, rest half should be rendered from previous level tile which is actually not happening. Has anyone faced similar issue? Thanks in advance.

jfirebaugh commented 10 years ago

Can you provide a URL template or an example tile?

iD does support transparent tiles and the overlay layers use it. However it does not render multiple tile zoom levels simultaneously and we don't plan to support that. If you want to display multiple resolutions of data in different areas of a particular zoom level, you need to bake that into the tiles.

GoldenCompass commented 10 years ago

You can see the screenshot attached below. Right side tile is of zoom level 15 while left side tile is of level 14. However the black strip is due to the tiles of level 15 as these tiles are not having the data for full extent of the tiles. Since tiles are transparent thus making the background color (here black) to appear. Can't we have previous levels tiles as background at such places? Or is there any way to generate tiles which perfectly matches with data boundary?

URL for application: http://bhuvan-mapper.nrsc.gov.in

untitled

jfirebaugh commented 10 years ago

Yeah, this is something that needs to be fixed in the tileset itself. To iD they are just image tiles and it isn't really feasible to detect areas of missing imagery and fill in with some other zoom level.