Skip to content

Add identity function type - #25

Merged
lucaswoj merged 1 commit into
masterfrom
identity
Sep 29, 2016
Merged

lucaswoj merged 1 commit into
masterfrom
identity

Conversation

@lucaswoj

Copy link
Copy Markdown

This PR adds an identity function type. This allows the use of property functions in some previously impossible ways:

  • passing an unbounded numeric value from a feature property to a style property
  • passing a color from a feature property to a style property
  • passing an arbitrary string from a feature property to a style property

cc @jfirebaugh @mourner @mollymerp for review

resolves #20

Launch Checklist

These are things we can do post PR review

  • update style spec documentation
  • update GL JS
  • open a ticket for parity with GL Native

@mourner mourner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Maybe consider adding an optional multiplier parameter, per @lbud's suggestion? That seems very useful for numerical values and also a single-line change.

@lucaswoj

Copy link
Copy Markdown
Author

It doesn't make sense to add a multiplier parameter to the identity function because of the definition of an identity function and the supported domain values of our identity function.

What do you think about creating a "mx+b" linear function with addend and multiplier parameters?

@mourner

mourner commented Sep 17, 2016

Copy link
Copy Markdown
Member

Yeah, sounds reasonable. Let's follow up with this later then.

@mollymerp

Copy link
Copy Markdown

This is so exciting! Can we merge this in so we can include the functionality in the Denver release?

@lucaswoj

Copy link
Copy Markdown
Author

@mollymerp Yes!! Let's do 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.

Add identity function

3 participants