I encountered a problem a couple of weeks ago. Our client had some customized kml data and want to load it in our system. As we know, when we placing our point, line or polygon on google earth, a name is always given and the format is
<name>xxx</name>.
com api has a function call setVisible which introduces a parameter called feature name, so this xxx can be used to set the specified feature on visible or invisible mode.
Yes...this function works well for any ASCII letters. For other characters like Chinese, the story is different.
If the language of google earth is english, this function works, otherwise, in some situations, this function fails.
The solution is: use xxx.kml instead of xxx as the name of the feature. It works for both english and non-english.
I consider it is a bug.
PS: it only occur in google earth client, the plugin version has no such problem so far.
本文探讨了在Google Earth中加载包含非ASCII字符的KML数据时遇到的问题及解决方案。通过使用完整的文件名而不是仅使用名称,解决了不同语言环境下功能失效的问题。
582

被折叠的 条评论
为什么被折叠?



