Skip to content
This repository has been archived by the owner on Dec 8, 2017. It is now read-only.

Allow style functions based upon computed properties #15

Closed
4 tasks
lucaswoj opened this issue Jun 7, 2016 · 2 comments
Closed
4 tasks

Allow style functions based upon computed properties #15

lucaswoj opened this issue Jun 7, 2016 · 2 comments

Comments

@lucaswoj
Copy link

lucaswoj commented Jun 7, 2016

{
  property: ['/', 'population', 'area'],
  stops: [[0, 'red'], [100, 'green']]
}

You can currently style features based on a single property and / or zoom. There are cases in which styling a feature based on a mathematical expression may be desirable, for example drawing a choropleth map of a ratio.

  • extend feature-filter to accept mathematical operators
  • amend the style spec
  • implement the feature in GL JS
  • implement the feature in GL Native
@lucaswoj
Copy link
Author

lucaswoj commented Jun 7, 2016

Perhaps this syntax could be extended to allow "joining" data with another source:

{
  property: ['getJSON', 'data.json', 'id'],
  stops: [[0, 'red'], [100, 'green']]
}

@jfirebaugh
Copy link
Contributor

Let's keep the discussion in mapbox/mapbox-gl-style-spec#47.

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

No branches or pull requests

2 participants