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

[core] Add support for data-driven styling #7372

Merged
merged 6 commits into from
Feb 2, 2017
Merged

[core] Add support for data-driven styling #7372

merged 6 commits into from
Feb 2, 2017

Conversation

jfirebaugh
Copy link
Contributor

@jfirebaugh jfirebaugh commented Dec 10, 2016

Core implementation of data-driven styling. Now needs SDK bindings.

Fixes #4860.
Fixes #6518.

@mention-bot
Copy link

@jfirebaugh, thanks for your PR! By analyzing this pull request, we identified @yhahn, @mollymerp and @ansis to be potential reviewers.

@jfirebaugh
Copy link
Contributor Author

@brunoabinader Did you say you were able to reproduce the mysterious valgrind errors (Assertion 'tres.status == VexTransOK' failed.)? I haven't been able to reproduce them in my Ubuntu 14.04 VM.

@brunoabinader
Copy link
Member

@jfirebaugh not that I remember of e.g. running the unit tests from this branch using valgrind 3.12.0 on my Linux Desktop (Ubuntu 16.04) it passed through w/ only minor suppressions from the NVIDIA GL driver.

@jfirebaugh jfirebaugh force-pushed the dds-wip branch 5 times, most recently from cfd7fa2 to 8191004 Compare January 23, 2017 18:46
@ivovandongen
Copy link
Contributor

@jfirebaugh While implementing some examples for Android, I noticed that the source functions seem to have some caching issues:

sourcefunction-cache-issue

This is on a fill layer with a categorical source function with three stops:

  • Jordaan, rgba(0, 0, 1, 1)
  • Prinseneiland, rgba(0, 1, 0, 1)
  • Westerpark, rgba(1, 0, 0, 1)]]

Similar behaviour on the examples for exponential and interval source functions.

@jfirebaugh jfirebaugh force-pushed the dds-wip branch 3 times, most recently from 4dda0fe to d867492 Compare January 26, 2017 00:23
@jfirebaugh
Copy link
Contributor Author

@ivovandongen Should be fixed in the latest push.

@ivovandongen
Copy link
Contributor

@jfirebaugh Thanks for merging in #7752. Two things that I wanted to verify are not in this version yet:

  • Exponential Functions: colorSpace
  • Categorical Functions: default value

Both, I couldn't find in the conversion templates

@tobrun / @zugaldia Would you mind reviewing here instead of in #7752?

@jfirebaugh
Copy link
Contributor Author

Yeah, go ahead and add it to the API. I'll probably be adding style spec support this week or next.

@ivovandongen
Copy link
Contributor

@jfirebaugh I've added a commit for the default value conversion and squashed the android api + unit tests into the android commit.

Besides that, I've fixed up some issues from a recent rebase for the android side of things, but I think there are still some issues on the iOS side and with the codestyle script; it generates a lot of new files ending in " when running make codestyle cc @kkaefer

@jfirebaugh
Copy link
Contributor Author

@ivovandongen Could you do a pass over the Android SDK to update it for 744487194e79badc91531ac31c11a0a7cf7c67fb (native counterpart of mapbox/mapbox-gl-js#4175)? Basically, the default value moved from being a member of CategoricalStops up to a property of SourceFunction and CompositeFunction.

@ivovandongen
Copy link
Contributor

@jfirebaugh Worked in defaultValue for composite and source functions. Assuming CI clears, Android is good to go.

@albanm
Copy link

albanm commented Mar 22, 2017

Hello,

I only read about IOS and android support, is data-driven styling available for node version too ?

I have a property based exponential function for a fill-color style that doesn't seem to work, but I am not sure if it is supposed to work.

@kkaefer
Copy link
Contributor

kkaefer commented Mar 22, 2017

@albanm data-driven styling is a feature of the renderer and stylesheet format. This is shared across all platforms, so you can use a stylesheet that uses data-driven styling with the Node.js bindings as well. The mentions of iOS/Android are specific to runtime styling support for data-driven styling. The Node.js bindings never had runtime-styling, so it doesn't apply to them.

@albanm
Copy link

albanm commented Mar 22, 2017

@kkaefer Ok, thanks for the quick and clear reply !

@1ec5
Copy link
Contributor

1ec5 commented Mar 22, 2017

The Node.js bindings never had runtime-styling, so it doesn't apply to them.

Basic runtime styling support was added to the Node module in #5318, but it doesn’t include property functions. You can set property functions via style JSON but can’t yet manipulate them via the runtime styling API. #8495 tracks the remaining work.

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

Successfully merging this pull request may close these issues.

9 participants