Skip to content

Commit

Permalink
Merge pull request #827 from geostyler/enhance-test
Browse files Browse the repository at this point in the history
Enhance unsupported properties test
  • Loading branch information
KaiVolland authored Dec 2, 2024
2 parents dc0ebfa + 8a6efd6 commit 37bddd4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
11 changes: 9 additions & 2 deletions data/olStyles/unsupported_properties.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import OlStyle from 'ol/style/Style';
import OlStyleFill from 'ol/style/Fill';
import OlStyleIcon from 'ol/style/Icon';

const olUnsupportedProperties = new OlStyle({
const unsupportedFill = new OlStyle({
fill: new OlStyleFill({
color: '#F1337F'
})
});
const unsupportedImage = new OlStyle({
image: new OlStyleIcon({
src: 'peter.png',
crossOrigin: 'anonymous'
})
});

export default olUnsupportedProperties;
export default [unsupportedFill, unsupportedImage];
4 changes: 4 additions & 0 deletions data/styles/unsupported_properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ const unsupportedProperties: Style = {
kind: 'Fill',
color: '#F1337F',
opacity: 0.5
}, {
kind: 'Icon',
image: 'peter.png',
anchor: 'bottom-left'
}]
}
]
Expand Down
5 changes: 4 additions & 1 deletion src/OlStyleParser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,10 @@ describe('OlStyleParser implements StyleParser', () => {
info: 'Use fillOpacity instead.',
support: 'none'
}
}
},
IconSymbolizer: {
anchor: 'none',
},
}
};
const warningsGot = ['Your style contains unsupportedProperties!'];
Expand Down
1 change: 1 addition & 0 deletions src/OlStyleParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export class OlStyleParser implements StyleParser<OlStyleLike> {
},
RasterSymbolizer: 'none',
TextSymbolizer: {
anchor: 'none',
placement: {
support:'partial',
info: 'point and line supported. line-center will be mapped to line.'
Expand Down

0 comments on commit 37bddd4

Please sign in to comment.