[英]javascript-how to set the animation range of kml file in google earth
Currently, if I click the button, the map will start to animate. 当前,如果我单击按钮,则地图将开始设置动画。 But it never stops, it animates infinitely.
但是它永远不会停止,它会无限地动画。 If there is a map/file is from 2004-2008, I just want that it stops on 2008-12-31 automatically.
如果地图/文件来自2004-2008,我只希望它在2008-12-31自动停止。 How can I do that?
我怎样才能做到这一点?
I tried 我试过了
var timeSpan = ge.createTimeSpan('');
timeSpan.getBegin().set('2004');
timeSpan.getEnd().set('2008');
ge.getTime().setTimePrimitive(timeSpan);
But it does not work, I think it may not work for my purpose. 但这是行不通的,我认为可能无法达到我的目的。 So please help me, I am so strugling....
所以请帮助我,我很挣扎...
There's a few things you can do, and it's hard to know what to recommend without know more what you are trying to build. 您可以做几件事,而又不了解要构建的内容,很难知道该推荐什么。 One suggestion:
一个建议:
This way a user can'd be fiddling with the UI (eg dragging the slider around) in a way that interferes with the story you are probably trying to tell... 这样,用户就可以摆弄用户界面(例如,拖动滑块),从而干扰您可能想讲述的故事...
You can see examples of much of the code mentioned above at http://code.google.com/apis/ajax/playground/#internal_clock_rate and some additional documentation at http://code.google.com/apis/earth/documentation/time.html 你可以看到在很多上面提到的例子代码http://code.google.com/apis/ajax/playground/#internal_clock_rate在和一些额外的文件http://code.google.com/apis/earth/documentation /time.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.