-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
icon-offset and icon-translate has icons rendered behind other layers #1882
Comments
This seems like a dupe of #757, so I will close for now. Feel free to reopen if it is distinct. |
This was supposedly fixed as part of #757 and released with v0.12.3 but still occurs, so it was not the same issue. Please reopen or confirm that icon offset/translate is not meant to be used this way. To reproduce, have a symbol layer with:
"paint": {
"icon-translate": [-25, 0]
}
|
http://codepen.io/anon/pen/yezaGy Zoom in on the symbol until it flips under a tile edge .. then out again. |
This may somehow be related to the GeoJSON source and perhaps @mourner ? |
Okay, perhaps the problem was quite obvious.. just setting I've updated the codepen. It seems there is no way to have the symbols being able to overlap each other without having the symbols sliding in under tile edges.. |
This behavior was not fixed by #757. The relevant bit of code is in There's no easy way to prevent drawing the symbols twice (once in each overlapped tile). |
The real solution will be to make your style possible without Maybe try setting "buffer" to 500 or even bigger:
|
@ansis Ah, thanks for that! Am I then correct in my assumption that this is related to the GeoJSON source itself? I took my data and served it with vector tiles instead and did not see traces of the same behaviour (although I didn't really test it thoroughly).. |
Yes, it's mostly a geojson issue. The equivalent |
The default buffer size was increased in #2026 |
I'm trying to realise a point layer with multiple symbol icons per point. To achieve this I've tried using the layout/paint properties icon-offset and icon-translate and while both do the trick, they both suffer from the fact that the adjusted icons are overpainted by other layers occasionally (tile edges?). Is this a bug or is it not meant to be used like this?
The text was updated successfully, but these errors were encountered: