-
-
Notifications
You must be signed in to change notification settings - Fork 649
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
Vector tile lines with line-offset get clipped #4160
Comments
Please provide a jsbin/codepen with a reproduction of the issue. |
Here you go @HarelM: https://jsbin.com/puquvoqude Red/blue lines are from the same source, but the red lines are offset. At certain zoom levels the red lines are clipped. Our guess is that it appears to be when they are out of the tile: |
The linked jsbin gives me an empty map, please try and provide a minimal reproduction. |
I removed my MapTiler API key, you will need to update the two
64 pixels was for demonstration, however the same effect occurs with smaller values (just less pronounced). I am hoping to be able to make some time to look into the code this week. |
maptiler style is very big, it is advised to try and reproduce this with our demotiles and a very basic style, preferably inline the style - 2-3 layers total. |
Ah, ok, try this one: https://jsbin.com/miputeqaji Note: seem to have to zoom in/out a little to get the tile lines to appear at all: Because the tiles are so big/simple I had to dial up the offset and it is a bit messy |
Is that likely to just be a flag that could be sensibly toggled? Seems like it would be a deeper (i.e. architectural) decision about the renderer...? I did start looking at the code, but didn't get very far. |
I meant to say that I couldn't find in the code the tiles' margin configuration, so it might be that the margin is configured inside the tile, the render draws each tile with the margin and then clips it to the actual tile size without the margins. |
Have been doing some investigation, and I might have found something useful:
This makes sense, as it appears that the offset lines are being clipped to their tile. I have implemented this change (certainly not a fix, as it would certainly break other things) in the following branch: https://github.com/stacy-rendall/maplibre-gl-js/tree/test/4160-tile-line-offset With example reproducing the issue and fix as noted below: http://localhost:9966/test/examples/vector-line-offset.html Initial behaviour(note: have to zoom in a few notches to get red lines to appear, then out again to get back to the original zoom) with StencilMode.disabled |
maplibre-gl-js version: 4.3.2
browser: all
Steps to Trigger Behavior
"line-offset": 24,
Expected Behavior
Continuous features should be rendered continuously, without weird looking graphical breaks
Actual Behavior
the features are continuous, same features at lower zoom:
![image](https://private-user-images.githubusercontent.com/19925993/333443562-653d2d7d-f223-4977-8e40-d666f62a4164.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkxMDA4ODksIm5iZiI6MTcxOTEwMDU4OSwicGF0aCI6Ii8xOTkyNTk5My8zMzM0NDM1NjItNjUzZDJkN2QtZjIyMy00OTc3LThlNDAtZDY2NmY2MmE0MTY0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIyVDIzNTYyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUzMzdlZTI0OTQzZWE4OWQwZTMyYTJjMmVmYWU0Zjc3YWI1YjQ5NDZjZDY1MjljYzQ5NzAyNWEzMjkxZTczNWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.qdg8O8PxePMIqIDjQe63noq-DxSp4GXcaXMDlsr8ums)
The text was updated successfully, but these errors were encountered: