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

Migrate to data-driven styling #27

Open
6 tasks done
1ec5 opened this issue Apr 7, 2017 · 0 comments
Open
6 tasks done

Migrate to data-driven styling #27

1ec5 opened this issue Apr 7, 2017 · 0 comments

Comments

@1ec5
Copy link

1ec5 commented Apr 7, 2017

This library currently creates a separate layer for each individual geometry or feature in the GeoJSON input in order to style it distinctly. Instead, it should create one each of symbol, line, and fill layers and set each layout or paint property to a property function that looks at the relevant property on each feature. Reducing the number of layers could improve performance and would also give us more flexibility with respect to z-ordering.

The following layout and paint properties would need to support data-driven styling:

DDS support for icon-allow-overlap, icon-size, line-cap, and line-join is unnecessary (although it’s already supported for icon-size) because we apply these properties to every symbol or line layer unconditionally.

Incidentally, mapbox/mapbox-gl-js#4087 would make it possible to remove the workaround that clones a path in order to give it both a fill and a stroke with customizable width (stroke-width).

/cc @bsudekum @jfirebaugh

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

No branches or pull requests

1 participant