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

How to handle points at tile boundaries #38

Open
rimig opened this issue Sep 14, 2015 · 1 comment
Open

How to handle points at tile boundaries #38

rimig opened this issue Sep 14, 2015 · 1 comment

Comments

@rimig
Copy link

rimig commented Sep 14, 2015

Hey all,

I'm struggling with how to handle points that straddle a tile boundary after adding a >1px radius. I think I understand what's going on here. The tile canvas that has the center of the point has no way to draw the complete point and there is no mechanism to inform adjacent tiles that they should draw the rest of the point (the part that bleeds over).

What's the thought on how to handle this? Any options besides smaller points?

Here's an example of how I'm hitting this, notice the points near the tile borders are cut off.

pointboundaries

I see that the confetti example has this as well but just masks it with smaller points based on zoom...
https://github.com/SpatialServer/Leaflet.MapboxVectorTile/blob/master/examples/confetti.js#L71

Unfortunately I need larger points so am hoping to figure out a way to handle this. Curious if anyone has ideas on what to do here.

Thanks,
Rob

@hallahan
Copy link
Contributor

Yes. There is a parameter in MapboxStudio / Mapnik where you can specify the tile buffer size. You want to increase that so there is a little bit of overlap of the data in the tile. I know the default is in Mapbox Studio. In your situation, if you have a larger tile buffer, that point will be in both tiles, and this library will indeed properly render the circle for each tile's canvas.

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

2 participants