-
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
Vector tile data rendered incorrectly if extent != 4096 #1093
Comments
Native side: mapbox/mapbox-gl-native#250 |
https://github.com/mapbox/mapbox-gl-js/blob/master/js/render/painter.js#L137
|
#1227 was my first shot at this and I'm restarting it with a new branch. |
With #1234 merged: We now have support for vector tiles that have an extent that isn't 4096. Still TODO is supporting vector tiles with multiple extents. In order to support that, we'll need to split the Tile class so that |
@ansis, here's an example of the problem persisting: http://trafficways.org/gltest/gl.html (copied from https://www.mapbox.com/mapbox-gl-js/examples/ except for adding my layer) It looks reasonable at low zooms, but z12 and beyond are garbage. The vector data is Made with
from TIGER 2014 data. It looks like an overflow problem, where coordinates that are supposed to be a little beyond the tile boundaries to the right or bottom become massively negative instead. |
Must be the Int16Array that will overflow when something goes beyond 32767? |
91d2e0e added another hard-coded 4096. |
It looks like all vector tiles get rendered the same regardless of the extent value in the pbf file. By default this value is 4096 so usually everything is fine. However, tippecanoe generates tiles with extents of 1024 and 2048 and those display incorrectly in mapbox-gl-js
I created an example gist (sorry no live version) that renders 3 vector tiles, each with the same short linestring data. The only difference is the extent values in the file (no other values changed or scaled). All are rendered on top of each other, when that is not correct. https://gist.github.com/paulmach/14fcf55bc67e8abdff62 Here is what it looks like:
FYI @ericfischer
The text was updated successfully, but these errors were encountered: