Skip to content

Commit

Permalink
Merge f27da09 into 9bf02ec
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiVolland committed Apr 26, 2019
2 parents 9bf02ec + f27da09 commit 8548bde
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion data/styles/line_simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const pointSimple: Style = {
dasharray: [12, 12],
cap: 'square',
join: 'round',
offset: 2,
perpendicularOffset: 2,
opacity: 1
}]
}]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"homepage": "https://github.com/terrestris/geostyler-qgis-parser#readme",
"dependencies": {
"geostyler-style": "0.14.2",
"geostyler-style": "1.1.0",
"geostyler-cql-parser": "0.1.2",
"lodash": "4.17.11",
"xml2js": "0.4.19",
Expand Down
6 changes: 4 additions & 2 deletions src/QGISStyleParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ export class QGISStyleParser implements StyleParser {
*/
public static title = 'QGIS Style Parser';

title = 'QGIS Style Parser';

/**
* The readStyle implementation of the GeoStyler-Style StyleParser interface.
* It reads a QML as a string and returns a Promise.
Expand Down Expand Up @@ -544,7 +546,7 @@ export class QGISStyleParser implements StyleParser {
lineSymbolizer.dasharray = qmlMarkerProps.customdash.split(';').map(parseFloat);
}
if (qmlMarkerProps.offset) {
lineSymbolizer.offset = parseFloat(qmlMarkerProps.offset);
lineSymbolizer.perpendicularOffset = parseFloat(qmlMarkerProps.offset);
}
if (qmlMarkerProps.line_width) {
lineSymbolizer.width = parseFloat(qmlMarkerProps.line_width);
Expand Down Expand Up @@ -763,7 +765,7 @@ export class QGISStyleParser implements StyleParser {
getQmlLineSymbolFromSymbolizer(symbolizer: LineSymbolizer): any {
const qmlProps: any = {
line_color: this.qmlColorFromHexAndOpacity(symbolizer.color, symbolizer.opacity),
offset: symbolizer.offset,
offset: symbolizer.perpendicularOffset,
offset_map_unit_scale: '3x:0,0,0,0,0,0',
offset_unit: 'Pixel',
joinstyle: symbolizer.join,
Expand Down

0 comments on commit 8548bde

Please sign in to comment.