-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fix generate Format tag #970
Conversation
Add Format as another item in ExternalGraphic
Hey @tltk90, thanks for your contribution. Could you add a new test with a corresponding SLD and geostyler-style? |
@@ -1901,13 +1901,19 @@ export class SldStyleParser implements StyleParser<string> { | |||
case 'png': | |||
case 'jpeg': | |||
case 'gif': | |||
graphic[0][ExternalGraphic][0][Format] = [`image/${iconExt}`]; | |||
graphic[0][ExternalGraphic][1][Format] = [{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure the index has to be changed from [ExternalGraphic][0]
to one [ExternalGraphic][1]
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. if it is on [ExternalGraphic][0]
the Format
was ignore.
@KaiVolland I think the existing tests are sufficient, I had a spelling error, that's why the tests failed earlier. |
If the tests were sufficient they should have failed before your MR 😄 . Or in other words; could you add a test that demonstrates the correct translation of a graphic with an extension? ... or just add an SLD to the issue that failed before this PR. I can add it afterwards. |
Sorry on the delay with the answer, You can see this in the test |
Thanks for the contribution @tltk90 🙏 |
Could solve #962