Skip to content
This repository has been archived by the owner on Apr 10, 2018. It is now read-only.

Drop paint classes #576

Merged
merged 10 commits into from
Nov 17, 2016
Merged

Drop paint classes #576

merged 10 commits into from
Nov 17, 2016

Conversation

anandthakker
Copy link
Contributor

  • Add deprecation notice for class-specific paint properties to v8.json and narrative docs.
  • Update API docs with declassStyle so that it can be referenced in ☝️
  • Create v9.json, and remove paint.*.
  • Initialize migrations/v9 with deref & declass functionality.

@anandthakker
Copy link
Contributor Author

Should v9.json be renamed to next.json (or something) so as not to imply that v9 is finished?

@jfirebaugh
Copy link
Contributor

Let's not create v9.json yet. Adding it now means we have to keep it in sync with changes in v8.json.

@anandthakker
Copy link
Contributor Author

👍 sounds good. Shall we keep migrations/v9, since that won't have to change unless there's a new migration?

Layers can also have class-specific paint properties, which are applied only when the map has a certain class
name set. For example, a layer with a <code>"paint.night"</code> property would have those properties applied
when the map has the <code>"night"</code> class set.
Layers can also have class-specific paint properties, defined with a property like <code>"paint.night"</code> and applied only when the map has a certain class
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's just remove this.

@@ -60,6 +107,29 @@ fs.writeFileSync('./dest.min.json', format(style, 0));
**Returns** `string`, stringified formatted JSON


### `exports(layers)`
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you fix the naming like you did with derefLayers? Should be groupByLayout.

function eachLayer(style, callback) {
for (var k in style.layers) {
callback(style.layers[k]);
eachLayer(style.layers[k], callback);
Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't be recursive.

@anandthakker
Copy link
Contributor Author

@jfirebaugh ^ changes made. Back to you.

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.

2 participants