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

Apply customizer feature to all features. #35

Closed
wants to merge 2 commits into from

Conversation

ismailsunni
Copy link
Collaborator

@ismailsunni ismailsunni commented Jul 24, 2024

Fix when the layer has empty string but still needs to be processed by customizer.feature

@gberaudo
Copy link
Contributor

Hi @ismailsunni , could you please explain your rationale?
If there is no symbolizer, the feature will not be displayed, right?

@ismailsunni
Copy link
Collaborator Author

There is a case where the layer has properties that shouldn't be included in the print spec. It might be property that is not serializable to JSON (circular reference) or simply it will make MFP throws an error.

So, even if the feature is not displayed, the "problematic" property is stil lincluded in the json print spec.

See an example: https://github.com/geoadmin/web-mapviewer/blob/master/src/api/print.api.js#L55-L60

@gberaudo
Copy link
Contributor

gberaudo commented Jul 30, 2024

I am still a bit uneasy with your approach.
I think we should:

@ismailsunni
Copy link
Collaborator Author

@gberaudo I agree with your approach. My approach is not solving the issue in the correct location.

So, should we add another parameter to pass a replacer in the requestReport function? And then use it we call JSON.stringify?

@ismailsunni
Copy link
Collaborator Author

Superseded by #37

@ismailsunni ismailsunni deleted the feature-customizer-to-all branch August 15, 2024 08:39
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

Successfully merging this pull request may close these issues.

2 participants