Skip to content
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

Issue with layers getting "cropped" on pan/tilt #5058

Closed
tbassett44 opened this issue Jul 27, 2017 · 10 comments
Closed

Issue with layers getting "cropped" on pan/tilt #5058

tbassett44 opened this issue Jul 27, 2017 · 10 comments
Labels

Comments

@tbassett44
Copy link

mapbox-gl-js version:
0.39.1

Steps to Trigger Behavior

The issue seems to be prevalent when the bearing or tilt are non-zero, other than that, this issues seems to be pretty hit or miss. Even though there are many layers configured in the same way, it only sometimes happens.

Expected Behavior

Markers should show in their entirety regardless of pan/tilt, especially with "icon-allow-overlap":true

Actual Behavior

Markers sometimes get cut off or dont show at all. See images below.

In the images below, a marker is animated across the map (non zero pan/tilt values). Interestingly, it started off as completely hidden, then as the marker moved, it slowly came into view with a clear line cutting off some of the marker.

upload_thumb-1
upload_thumb

Any help with this would be greatly appreciated, thanks!

@tbassett44
Copy link
Author

Here is a video to see a bit more clearly...

https://player.groupup.me/video/YnLtw1Uzw

@pathmapper
Copy link
Contributor

@tbassett44 this is likely related to #2706.
I had a similar issue. You could try to increase the tile buffer or set "icon-allow-overlap":false .

@tbassett44
Copy link
Author

tbassett44 commented Jul 28, 2017

@pathmapper How/where do you change the tile buffer? Not seeing much documentation on that (https://www.mapbox.com/mapbox-gl-js/style-spec/#sources-geojson-buffer). I tried a buffer of 512 on the source in question and it had no effect, it still clips. Setting "icon-allow-overlap":false seems to fix but for the application, it needs to be set to true. Will work as a work around for now

Thanks for the quick response!

@pathmapper
Copy link
Contributor

@tbassett44 are you using a custom or a Mapbox tileset? When you are creating a custom tileset you could use Mapbox Studio Classic. There it is possible to set the buffer size in the data layer options. Or you could use tippecanoe with -b option. With the current Mapbox Studio I think it is not possible at the moment.

@mollymerp
Copy link
Contributor

@tbassett44 can you provide a jsfiddle or jsbin that reproduces this behavior?

@tbassett44
Copy link
Author

@mollymerp It is not being reproduced here, but I made a lot of headway on the jsfiddle. I have a feeling this might be due to the complexities of the overall map being built. Will put in the time when I have it to try to reproduce entirely.

https://jsfiddle.net/gxc5ca9d/13/

@pathmapper
Copy link
Contributor

jsfiddle with cut marker: https://jsfiddle.net/gxc5ca9d/14/

@tbassett44
Copy link
Author

Wow, thanks @pathmapper!!! Seeing as you were able to reproduce, does this fit with what you were saying above? We get our tiles from: https://openmaptiles.com/ and we have a custom tile serving mechanism.

@pathmapper
Copy link
Contributor

Can't reproduce with v0.42.0: https://jsfiddle.net/gxc5ca9d/15/

Seems that #5150 fixed it.

@mollymerp
Copy link
Contributor

Thanks @pathmapper ! Glad to hear it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants