-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Remove Duplicate Namespace Declarations #5972
Conversation
Welcome to the Cesium community @JeremyMarzano-ISPA! Can you please send in a Contributor License Agreement (CLA) so that we can review and merge this pull request? I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome. 🌍 🌎 🌏 |
Hi @JeremyMarzano-ISPA, thanks for the PR. @tfili will give this a review shortly! It looks like you have a corporate CLA, but could you please update |
@JeremyMarzano-ISPA Thanks for your PR. This will only detect duplicates if it is defined twice, but not 3 times. It will find occurrence |
Thank you @ggetz. I have updated CONTRIBUTORS.md with my information. @tfili Thank you for the review. I have updated the function to continue to search for duplicates of the same namespace, until no duplicates are found. I have also updated the test case to include this. Please let me know if you find any other issues, or have any additional comments. Thank you. |
@JeremyMarzano-ISPA can you merge in master when you have a chance? |
@hpinkos Thank you for letting me know. I have merged with master. |
@@ -2369,6 +2391,9 @@ define([ | |||
//Insert missing namespaces | |||
text = insertNamespaces(text); | |||
|
|||
//Remove Duplicate Namespaces | |||
text = removeDuplicateNamespaces(text); |
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.
This won't get called for kmz files. Look for all the occurrences of insertNamespaces(...)
. This should be called in the same places.
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.
Thank you for finding that. I have updated the PR with a call for KMZ's as well. Please let me know if you find any other issues. Thank you.
Source/DataSources/KmlDataSource.js
Outdated
endIndex = text.indexOf('\"', (text.indexOf('\"', index) + 1)); | ||
text = text.slice(0, index -1) + text.slice(endIndex + 1, text.length); | ||
index = text.indexOf('xmlns:', startIndex - 1); | ||
} |
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.
Else should be on same line as the previous curly brace.
Thanks @JeremyMarzano-ISPA. |
Description