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

Add function type "identity" to color, radius, height stops #144

Open
ryanbaumann opened this issue Jan 26, 2019 · 3 comments · May be fixed by #161
Open

Add function type "identity" to color, radius, height stops #144

ryanbaumann opened this issue Jan 26, 2019 · 3 comments · May be fixed by #161

Comments

@ryanbaumann
Copy link
Contributor

Problem

As a data scientist or developer, I want to build an application where a visualization's "height", "radius", or "color" is encoded directly into the source data as a property - for example, `"height": 2001. This matters because I can create buildings that are the exact correct height in a 3D extrusion visualization.

Solution

Add identity function to

height_function_type='interpolate',

@akacarlyann
Copy link
Collaborator

@ryanbaumann Would this be similar to setting height_function_type='match' and specifying the height_property='height'? It's a little clumsy, but just wanted to check if that's the same behavior you're looking for. I like your idea of including height_function_type='identity'. Then we can have the viz automatically specify the height property without the user having to edit two arguments.

@akacarlyann akacarlyann linked a pull request Jun 22, 2019 that will close this issue
@akacarlyann akacarlyann self-assigned this Jun 22, 2019
@ryanbaumann
Copy link
Contributor Author

@akacarlyann instead of using a height_function_type that was match, we want to create a Mapbox GL expression under the hood that sets the value from the data column directly equal to the value used in the map. The identity keyword would indicate to pass ['get', 'myColumnName]` as the expression to the layer created by the Python Viz function.

@akacarlyann
Copy link
Collaborator

@ryanbaumann cool cool. That's what I started in #161. Definitely nice to have this option.

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

Successfully merging a pull request may close this issue.

2 participants