mapbox / mapbox-gl-style-spec

76 stars 38 forks source link

Fix language drift and connect "property functions" to data-driven styles #567

Closed tmcw closed 7 years ago

tmcw commented 8 years ago

Via a support question this morning:

Can I get a list of which layout/paint properties are supported for use with Property Functions... The documentation just says it is not fully supported and I can't easily tell from the code.

Right now we have, under Property Functions:

Note that support for property functions is not available across all properties and platforms at this time.

But then in the per-property spec

2016-11-08 at 11 51 am

We need to connect these things by

  1. Explicitly telling people how to check if a thing is supported
  2. OR Using the same words to describe "property functions" and "data driven styles"
jfirebaugh commented 8 years ago

"data-driven styles" / "data-driven styling" is an umbrella term. "property functions" are one type of data-driven function. "zoom-and-property functions" is another. (Arguably, the interpolation syntax supported by text-field and icon-image are a third.)

The documentation should refer to support for "data-driven styling", not about support for "property functions" specifically. We're not going to create any properties that support property functions but not zoom-and-property functions, and most people looking for DDS support information don't care about the difference between those two types of functions.

tmcw commented 8 years ago

@jfirebaugh I see your objection but am not seeing a proposal to clarify the documentation.

To restate the problem without potentially incorrect wording:

If we say that support for "property functions" varies but we don't say "property function" anywhere in the particular property documentation, we're inviting the reader to ask a question and not providing the answer. I am amenable to any solution that fixes this problem.

jfirebaugh commented 8 years ago

Concretely, I suggest fixing #529 and then replacing "Note that support for property functions is not available across all properties and platforms at this time." with the following:

Support for property functions and zoom-and-property functions -- commonly known as "data-driven styling" -- varies by style property and SDK. Refer to the "data-driven styling" row in the SDK Support matrix for the property you're interested in.

stevage commented 7 years ago

Thanks very much for addressing this issue. I've been bitten a few times.

Things that happen to me:

Also...tiny unrelated issue: Function "type" and Function "colorSpace" don't mention what their defaults are.

lucaswoj commented 7 years ago

This issue was moved to mapbox/mapbox-gl-js#4139