Google Earth时间戳动画序列问题
我一直试图通过在不同时间在地图上绘制点来制作 Google 地球(GE)中的动画示例。但是我似乎无法让它工作。我正在使用 Google 的 KML 并查看了文档。
以下是在不同时间戳绘制 3 个点的示例。我使用“TimeStamp”标签,其中包含“begin”和“end”标签。这就是他们在 Google 文档页面上显示它的工作方式,但是它似乎不起作用,因为当我打开文件时,GE 上的时间线没有显示(当存在“时,时间线总是应该显示在 GE 中”) KML 文件中的时间戳”标签)。然而,当我将“开始”和“结束”标签更改为“何时”标签时,它似乎可以工作,但不是我想要的方式。有谁知道我使用的“开始”和“结束”标签是否错误?这是 Google 提供的文档 http://code.google.com/ apis/kml/documentation/kmlreference.html#timespan
这是我正在谈论的示例。您可以通过将其另存为 KML 文件来在 GE 中打开它。您将看到 3 个点出现,但没有动画。我真正想要发生的是让一个点出现,然后消失,然后让下一个点出现并消失......
感谢大家的帮助;)
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Style id="dotstyle">
<IconStyle>
<scale>0.3</scale>
<Icon>
<href>http://www.rootsweb.ancestry.com/~tnmeigs/images/dark-red-circle.png</href>
</Icon>
</IconStyle>
</Style>
<Placemark>
<TimeStamp>
<begin>2010-01-01</begin>
<end>2010-01-02</end>
</TimeStamp>
<styleUrl>#dotstyle</styleUrl>
<Point>
<coordinates>110.43852082858155,-7.582042422936696</coordinates>
</Point>
</Placemark>
<Placemark>
<TimeStamp>
<begin>2010-01-02</begin>
<end>2010-01-03</end>
</TimeStamp>
<styleUrl>#dotstyle</styleUrl>
<Point>
<coordinates>110.43852082858155,-7.592042422936696</coordinates>
</Point>
</Placemark>
<Placemark>
<TimeStamp>
<begin>2010-01-03</begin>
<end>2010-01-04</end>
</TimeStamp>
<styleUrl>#dotstyle</styleUrl>
<Point>
<coordinates>110.43852082858155,-7.602042422936696</coordinates>
</Point>
</Placemark>
</Document>
</kml>
I have been trying to make a example of a animation in Google Earth (GE) by plotting points on the map at different times. However I can't seem to get it to work. I am using Google's KML and have looked at the documentation.
The following is a example of plotting 3 points at different timestamps. I am using the "TimeStamp" tag with the "begin" and "end" tags inside. This is how they show it working on the Google documentation page, however it does not seem to work becuase the time line on GE does not show up when I open the file (the timeline is always supposed to show up in GE when there are "TimeStamp" tags in the KML file). However, when I change the "begin" and "end" tags to just a "when" tag, it seems to sort of work but not in the way I wanted to. Does anyone know if I am using the "begin" and "end" tags wrong? This is the doc that Google gives http://code.google.com/apis/kml/documentation/kmlreference.html#timespan
Here is the example I was talking about. You can open it in GE by saving it as a KML file. You will see the 3 dots show up but no animation. What I really wanted to happen was have one dot show up, then disappear, then have the next dot show up and disappear ...
Thanks for the help in advanced everyone ;)
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Style id="dotstyle">
<IconStyle>
<scale>0.3</scale>
<Icon>
<href>http://www.rootsweb.ancestry.com/~tnmeigs/images/dark-red-circle.png</href>
</Icon>
</IconStyle>
</Style>
<Placemark>
<TimeStamp>
<begin>2010-01-01</begin>
<end>2010-01-02</end>
</TimeStamp>
<styleUrl>#dotstyle</styleUrl>
<Point>
<coordinates>110.43852082858155,-7.582042422936696</coordinates>
</Point>
</Placemark>
<Placemark>
<TimeStamp>
<begin>2010-01-02</begin>
<end>2010-01-03</end>
</TimeStamp>
<styleUrl>#dotstyle</styleUrl>
<Point>
<coordinates>110.43852082858155,-7.592042422936696</coordinates>
</Point>
</Placemark>
<Placemark>
<TimeStamp>
<begin>2010-01-03</begin>
<end>2010-01-04</end>
</TimeStamp>
<styleUrl>#dotstyle</styleUrl>
<Point>
<coordinates>110.43852082858155,-7.602042422936696</coordinates>
</Point>
</Placemark>
</Document>
</kml>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该使用
而不是
并且它会起作用。
需要
而不是
和You should use
<TimeSpan>
rather than<TimeStamp>
and it will work.<TimeStamp>
expects<when>
rather than<begin>
and<end>
为什么不考虑使用
它用于将地标或模型从一个点移动到下一个点。更多信息请点击这里:http://code.google.com/apis/kml/documentation/kmlreference .html#gxtrack
Why don't you look into using
<gx:track>
It is used to move a placemark or model from one point to the next. More info here:http://code.google.com/apis/kml/documentation/kmlreference.html#gxtrack