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

symbol icons clipped at tile boundaries #1271

Closed
anandthakker opened this issue Jun 13, 2015 · 20 comments
Closed

symbol icons clipped at tile boundaries #1271

anandthakker opened this issue Jun 13, 2015 · 20 comments

Comments

@anandthakker
Copy link
Contributor

screen shot 2015-06-13 at 6 29 49 pm

Context:

  • mapbox-gl-js version: current master.
  • points are in a vector tile source generated by tippecanoe
  • using the default sprite sheet, dot.sdf
  • using multiple style layers, setting filter in order to color based on a property value
@mourner
Copy link
Member

mourner commented Jun 13, 2015

What's the tile buffer when generating with tippecanoe?

@anandthakker
Copy link
Contributor Author

@mourner Unsure, but I'll ask @kamicut, who generated it.

Meanwhile, I just realized that it's also happening with a GeoJSON source.

@anandthakker
Copy link
Contributor Author

Looks like it just used the default for buffer, which according to the tippecanoe docs is 5. The screen shot above was ~ z6-z7 or so, and icon-size is on a ramp: [4, 1], [6, 2], [8, 4], [10, 8], [12, 16].

@jfirebaugh
Copy link
Contributor

Does using a larger buffer fix the issue?

@anandthakker
Copy link
Contributor Author

@jfirebaugh Will check it out with the vector tile source. What's a good size to use?

Meanwhile, it looks like the buffer option in geojson-vt isn't exposed for GeoJSON sources...

@mourner
Copy link
Member

mourner commented Jun 15, 2015

@anandthakker good call about GeoJSON, it should. Could you hardcode it there and see if the GeoJSON issue you're seeing is gone?

@ansis
Copy link
Contributor

ansis commented Jun 15, 2015

It could also be that the data thinning for low zoom levels isn't consistent between tiles. If this is the case, it doesn't matter if the buffer is big enough.

Symbols that are allowed to overlap are clipped at tile boundaries so that sorting by the y position works correctly near tile boundaries: mapbox/mapbox-gl-native#1673

If inconsistent thinning is the problem this could be fixed by:

  • making it consistent (hard)
  • never clipping symbols at tile boundaries and being ok with it looking like this
  • add some style property to enable/disable y sorting and the clipping it needs

@anandthakker
Copy link
Contributor Author

@mourner sure thing. Will check it out when I'm back at my computer.

@e-n-f
Copy link
Contributor

e-n-f commented Jun 15, 2015

I'm pretty sure @ansis is right and the problem is that the point-dropping isn't consistent between tiles. I'm working on some line-dropping changes now in mapbox/tippecanoe#55 that require adjacent tiles to be consistent, so maybe I could do something similar for dots.

@anandthakker
Copy link
Contributor Author

@mourner @jfirebaugh @ansis Just tried hardcoding the GeoJSON source to buffer: 256 and it fixed the issue. Haven't had a chance to try upping the buffer on the vector tiles, but will try to check that out soon too.

Slightly related question: where can I go to understand how these buffers work? (So that I can get a sense of how to choose the right size?)

@anandthakker
Copy link
Contributor Author

@mourner would you be open to a PR that exposes the buffer option for GeoJSON sources?

@mourner
Copy link
Member

mourner commented Jun 16, 2015

@anandthakker sure!

@ashleyclough
Copy link

I've a similar example where location names as symbols appear to be being cut off on tile boundaries. Closer inspection when zooming suggests that they are not getting cut off but are being overlaid by polygons in adjacent tiles that have what look like differing z values.

See live: http://parallel.co.uk/os-openmap-gl/#13.19/50.9028/-1.3207

Also pan westwards to see the word 'Southampton' appear and disappear behind buildings.
tile clipping example

If you try it on an iPad you can actually see the shearing of the tiles.

@mourner
Copy link
Member

mourner commented Jun 17, 2015

@ashleyclough yeah, that looks like #757

@jfirebaugh
Copy link
Contributor

Addressed by #1287.

@anandthakker
Copy link
Contributor Author

Note: #1287 dealt with this for GeoJSON sources, but it's still happening for my (tippecanoe-generated) vector tile source.

@mourner
Copy link
Member

mourner commented Jun 19, 2015

@anandthakker yeah, but that should probably be solved on the VT side.

@anandthakker
Copy link
Contributor Author

@mourner Agreed. Just noted it here for any future googlers :)

@jtFrancisco
Copy link

What do you do if a tile boundary clips off the corner of a polygon when you upload it as a tileset in Mapbox Studio?
screen shot 2016-07-16 at 1 55 18 pm

@lucaswoj
Copy link
Contributor

@donbigote this looks like a bug in Studio. I recommend contacting our support team.

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

No branches or pull requests

8 participants