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 several colors from field #321

Merged
merged 1 commit into from
Jun 1, 2020

Conversation

MohamedHamouGisaia
Copy link
Member

No description provided.

@@ -1603,6 +1626,7 @@ export class MapContributor extends Contributor {
topologyLayer.metrics = ls.metrics;
topologyLayer.granularity = <any>ls.granularity;
topologyLayer.providedFields = ls.provided_fields;
topologyLayer.colorFields = new Set(ls.colors_from_fields ? ls.colors_from_fields : []);

Choose a reason for hiding this comment

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

You could alsu use ls.colors_from_fields || [] to avoid the check

featureLayer.returnedGeometry = ls.returned_geometry;
featureLayer.providedFields = ls.provided_fields;
featureLayer.colorFields = new Set(ls.colors_from_fields ? ls.colors_from_fields : []);

Choose a reason for hiding this comment

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

same comment

"description": "a field which values will be transformed to colors, thanks to ARLAS-color-service, and used for a data-driven colouring of the layer features.",
"type": "string"
"colors_from_fields": {
"description": "a list of fields which values will be transformed to colors, thanks to ARLAS-color-service, and used for a data-driven colouring of the layer features.",

Choose a reason for hiding this comment

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

which => whose ?

@MohamedHamouGisaia MohamedHamouGisaia merged commit 6cfd7ad into develop Jun 1, 2020
@MohamedHamouGisaia MohamedHamouGisaia deleted the feature/colors_from_field branch June 1, 2020 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants