Skip to content

Apply customizer feature to all features.#35

Closed
ismailsunni wants to merge 2 commits intomainfrom
feature-customizer-to-all
Closed

Apply customizer feature to all features.#35
ismailsunni wants to merge 2 commits intomainfrom
feature-customizer-to-all

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