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

feat(import-export): imported file can be styled from a style list #571

Merged
merged 22 commits into from
Feb 3, 2020

Conversation

drekss
Copy link
Contributor

@drekss drekss commented Jan 31, 2020

imported file can be styled from a style list.

"importWithStyle" must be true in config.json

the style-list.json is in config and contains the list of style for the import component. A default style is set in this list too.

@drekss
Copy link
Contributor Author

drekss commented Jan 31, 2020

example of style-list.json
{
"default": {
"style": {
"fill": {
"color": "red"
},
"stroke": {
"color": "black"
}
}
},
"bureaux_locaux": {
"styleByAttribute": {
"type": "circle",
"attribute": "type",
"data": ["local", "regional"],
"fill": ["blue", "red"],
"stroke": ["black", "black"],
"label": "type"
}
},
"countries": {
"style": {
"fill": {
"color": "red"
},
"stroke": {
"color": "black",
"width": 4
}
}
}
}

@mbarbeau
Copy link
Member

mbarbeau commented Feb 3, 2020

It could be interesting that the user can pass this style instead of defining all the possibilities.

@mbarbeau mbarbeau merged commit 8b7565c into infra-geo-ouverte:master Feb 3, 2020
@drekss drekss deleted the import-in-layer branch May 4, 2020 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants