feature name and visibility

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)