Skip to content
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

Enhance parsing of format for ExternalGraphic (IconSymbolizer) #1453

Closed
dsuren1 opened this issue May 20, 2021 · 2 comments
Closed

Enhance parsing of format for ExternalGraphic (IconSymbolizer) #1453

dsuren1 opened this issue May 20, 2021 · 2 comments
Assignees

Comments

@dsuren1
Copy link

dsuren1 commented May 20, 2021

Feature Request

With respect to IconSymbolizer, the format for ExternalGraphic is obtained from the image, but there are some cases where the image url doesn't explicitly mentions the format (ex. https://master.demo.geonode.org/documents/1623/link). In this case even though the source is valid, the format is not obtained by the parser which poses a limitation.

Describe the solution you'd like
The IconSymbolizer should also allow user to specify the format or the parser should try to obtain the content-type of the image provided to obtain the format if missing.

Describe alternatives you've considered

  • There could be a support to have a format property for IconSymbolizer in geostyler-style which would allow the user to specify one (Limits the guessing of the format)
{
  name: 'External Graphic',
  rules: [{
    name: '',
    symbolizers: [{
      kind: 'Icon',
      image: 'https://sample.test.com/testlogo',
      format: 'image/png'
      size: 10,
      rotate: 90
    }]
  }]
};
  • Or alternatively, without modifying geostyler-style, other parsers and component, the image format could be obtained from the content-type when the image URL doesn't have format mentioned
@jansule
Copy link
Contributor

jansule commented May 21, 2021

Good point!

I would prefer to extend the geostyler-style IconSymbolizer directly.

@dsuren1 it would be awesome if you can create a PR for this

@KaiVolland
Copy link
Collaborator

Fixed via geostyler/geostyler-style#280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants