diff --git a/data/olStyles/unsupported_properties.ts b/data/olStyles/unsupported_properties.ts index afb503c8..86819984 100644 --- a/data/olStyles/unsupported_properties.ts +++ b/data/olStyles/unsupported_properties.ts @@ -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]; diff --git a/data/styles/unsupported_properties.ts b/data/styles/unsupported_properties.ts index 2f507fdb..b4204474 100644 --- a/data/styles/unsupported_properties.ts +++ b/data/styles/unsupported_properties.ts @@ -9,6 +9,10 @@ const unsupportedProperties: Style = { kind: 'Fill', color: '#F1337F', opacity: 0.5 + }, { + kind: 'Icon', + image: 'peter.png', + anchor: 'bottom-left' }] } ] diff --git a/src/OlStyleParser.spec.ts b/src/OlStyleParser.spec.ts index e6f08fe1..71a581c8 100644 --- a/src/OlStyleParser.spec.ts +++ b/src/OlStyleParser.spec.ts @@ -1316,7 +1316,10 @@ describe('OlStyleParser implements StyleParser', () => { info: 'Use fillOpacity instead.', support: 'none' } - } + }, + IconSymbolizer: { + anchor: 'none', + }, } }; const warningsGot = ['Your style contains unsupportedProperties!']; diff --git a/src/OlStyleParser.ts b/src/OlStyleParser.ts index 5ba37e7c..8aa48eaa 100644 --- a/src/OlStyleParser.ts +++ b/src/OlStyleParser.ts @@ -119,6 +119,7 @@ export class OlStyleParser implements StyleParser { }, RasterSymbolizer: 'none', TextSymbolizer: { + anchor: 'none', placement: { support:'partial', info: 'point and line supported. line-center will be mapped to line.'