Skip to content

Commit

Permalink
Fix style commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jericks committed Mar 24, 2022
1 parent d366a2f commit acd587d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/groovy/org/geoshell/style/StyleCommands.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ class StyleCommands implements CommandMarker {
String layerName
) {
StyleRepository styleRepository = StyleRepositoryFactory.getStyleRepository(type, StyleRepositoryFactory.getParameters(params))
List<Map<String,String>> styles = []
List<Map<String,Object>> styles = []
if (layerName) {
styles.addAll(styleRepository.getForLayer(layerName))
} else {
Expand All @@ -313,9 +313,9 @@ class StyleCommands implements CommandMarker {
) {
StyleRepository inputStyleRepository = StyleRepositoryFactory.getStyleRepository(inputType, StyleRepositoryFactory.getParameters(inputParams))
StyleRepository outputStyleRepository = StyleRepositoryFactory.getStyleRepository(outputType, StyleRepositoryFactory.getParameters(outputParams))
List<Map<String, String>> styles = inputStyleRepository.getAll()
styles.each {Map<String,String> style ->
outputStyleRepository.save(style.layerName, style.styleName, style.style)
List<Map<String, Object>> styles = inputStyleRepository.getAll()
styles.each {Map<String,Object> style ->
outputStyleRepository.save(style.layerName, style.styleName, style.styleStr, [:])
}
"Copy styles from ${inputType} to ${outputType}"
}
Expand Down

0 comments on commit acd587d

Please sign in to comment.