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

switch geojson units from 4096 to pixels #2026

Merged
merged 1 commit into from
Feb 2, 2016
Merged

switch geojson units from 4096 to pixels #2026

merged 1 commit into from
Feb 2, 2016

Conversation

ansis
Copy link
Contributor

@ansis ansis commented Jan 30, 2016

The units for these GeoJSONSource options changed from 4096 to pixels:

  • tolerance
  • buffer
  • clusterSize

To convert an old value to pixels divide by 8.
An old value of 400 is the same as 400 / 8 = 50 now.

This is a breaking change.

This also increases the default buffer size (how much data padding exists on the sides of the tiles) to 128 pixels. Having a big enough buffer is important for crosstile label placement and to avoid clipping for at tile edges for symbols that are allowed to overlap with each other. This does make the tiles bigger but it think it's worth it.

👀 @mourner @jfirebaugh @lucaswoj

@jfirebaugh
Copy link
Contributor

👍

#1967 will need to be updated.

The units for these GeoJSONSource options changed from 4096 to pixels:
- tolerance
- buffer
- clusterSize

To convert an old value to pixels divide by 8.
An old value of 400 is the same as 400 / 8 = 50 now.

This also increases the default buffer size (how much data padding
exists on the sides of the tiles) to 128 pixels. Having a big enough
buffer is important for crosstile label placement and to avoid clipping
for at tile edges for symbols that are allowed to overlap with
each other. This does make the tiles bigger but it think it's worth it.
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

Successfully merging this pull request may close these issues.

2 participants