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

Can we move properties from the bucket declaration into the style declaration? #301

Closed
nickidlugash opened this issue Feb 19, 2014 · 3 comments

Comments

@nickidlugash
Copy link

@edenh's comment from #300

Any chance we can move fontSize and padding out of the bucket declaration and into the style declaration?

Is it possible to move other properties as well? E.g. "cap" and "join" for lines? That way, we can use the same bucket for roads and road casings, but specify different cap and joins in the style. Would this be more efficient, or would it be more efficient to just create two buckets (one for roads and one for road casings)?

@edenh
Copy link
Contributor

edenh commented Feb 19, 2014

@nickidlugash you could create two buckets in that scenario. I think it makes sense to move fontSize because it would be nice to allow for zoom-aware transitions for labels.

Are there cases where you need transitions for cap, join, etc?

@ansis
Copy link
Contributor

ansis commented Feb 19, 2014

In general, the bucket properties affect how the data is processed and represented when it is first loaded and the style properties are things we can change without affecting the underlying representation of the data.

By padding do you mean the minimum distance between two labels? this can't be moved out of the bucket because this affect placement which needs to be calculated when the tile is first loaded. The fontSize also affects collision detection and is needed when first processing the tile. But it should by possible to implement fontSizes as functions (#300). It might also be possible to implement padding as functions.

Line cap and join properties affect how we need to process the data, so you would need to create two different buckets.

@edenh
Copy link
Contributor

edenh commented Feb 19, 2014

padding is probably a much lower priority.

@ansis ansis closed this as completed Feb 19, 2014
bensleveritt pushed a commit to bensleveritt/mapbox-gl-js that referenced this issue Oct 24, 2016
lucaswoj pushed a commit that referenced this issue Jan 11, 2017
The prior validate.array does the necessary type checking.

Fixes #301
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

3 participants