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

Assigning default function type from spec #178

Merged
merged 1 commit into from
Oct 18, 2017

Conversation

pjsier
Copy link
Contributor

@pjsier pjsier commented Oct 16, 2017

Fixes some lingering issues from #161. I noticed that when I load a style where the type wasn't explicitly identified on a data driven style that it would default to categorical. Instead of this, if an uploaded style doesn't have a type property this checks the fieldSpec to determine what it should be.

According to the style spec details on functions, any property that supports interpolated must be numeric and defaults to exponential, and any property that is numeric and supports functions (checked elsewhere) must support interval. I'm using that logic in getFieldFunctionType to determine which to assign, and it's worked on styles I've tested for exponential, interval, and categorical

@orangemug orangemug merged commit ddb3bcd into maplibre:master Oct 18, 2017
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