我有一些雷达数据要通过 Google 地球插件显示。一般是一些带有坐标和时间戳的地物。我按照https://developers.google.com/kml/documentation/time中的说明,尝试了时间戳和时间跨度,它工作正常。但显示效果并不理想。
对于时间戳解决方案,地标只是在“”标签指示的时间短暂闪烁。当我按下播放按钮时,地图上什么也没有。代码示例:
<Folder>
<name>Vehicles</name>
<description>Timeline information of vehicles</description>
<Placemark>
<name>2</name>
<description>(-84.114231,39.785436,-0.000216),V(13.411216,37.555181) at 0.00s</description>
<TimeStamp>
<when>2012-09-19T08:00:00Z</when>
</TimeStamp>
<styleUrl>#vehicleStyle</styleUrl>
<Point>
<coordinates>-84.114231,39.785436,-0.000216</coordinates>
</Point>
</Placemark>
<Placemark>
<name>910</name>
<description>(-84.110335,39.788438,-0.000024),V(0.000000,0.000000) at 0.80s</description>
<TimeStamp>
<when>2012-09-19T08:00:30Z</when>
</TimeStamp>
<styleUrl>#vehicleStyle</styleUrl>
<Point>
<coordinates>-84.110335,39.788438,-0.000024</coordinates>
</Point>
</Placemark>
<Placemark>
<name>2</name>
<description>(-84.114133,39.785494,-0.000285),V(13.411216,37.555118) at 0.80s</description>
<TimeStamp>
<when>2012-09-19T08:00:30Z</when>
</TimeStamp>
<styleUrl>#vehicleStyle</styleUrl>
<Point>
<coordinates>-84.114133,39.785494,-0.000285</coordinates>
</Point>
</Placemark>
<Placemark>
<name>910</name>
<description>(-84.110307,39.788410,-0.000046),V(3.499966,307.390012) at 1.60s</description>
<TimeStamp>
<when>2012-09-19T08:01:00Z</when>
</TimeStamp>
<styleUrl>#vehicleStyle</styleUrl>
<Point>
<coordinates>-84.110307,39.788410,-0.000046</coordinates>
</Point>
</Placemark>
</Folder>
...
对于时间跨度的情况,动画是可以的,但每个对象后面总是有一个尾巴:前一帧中的地标不会在新时间跨度开始时立即消失。
代码示例:
...
<Folder>
<name>Vehicles</name>
<description>Timeline information of vehicles</description>
<Placemark>
<name>2</name>
<description>(-84.114231,39.785436,-0.000216),V(13.411216,37.555181) at 0.00s</description>
<TimeSpan>
<begin>2012-09-19T08:00:00Z</begin>
<end>2012-09-19T08:00:10Z</end>
</TimeSpan>
<styleUrl>#vehicleStyle</styleUrl>
<Point>
<coordinates>-84.114231,39.785436,-0.000216</coordinates>
</Point>
</Placemark>
<Placemark>
<name>910</name>
<description>(-84.110335,39.788438,-0.000024),V(0.000000,0.000000) at 0.80s</description>
<TimeSpan>
<begin>2012-09-19T08:00:10Z</begin>
<end>2012-09-19T08:00:20Z</end>
</TimeSpan>
<styleUrl>#vehicleStyle</styleUrl>
<Point>
<coordinates>-84.110335,39.788438,-0.000024</coordinates>
</Point>
</Placemark>
<Placemark>
<name>2</name>
<description>(-84.114133,39.785494,-0.000285),V(13.411216,37.555118) at 0.80s</description>
<TimeSpan>
<begin>2012-09-19T08:00:10Z</begin>
<end>2012-09-19T08:00:20Z</end>
</TimeSpan>
<styleUrl>#vehicleStyle</styleUrl>
<Point>
<coordinates>-84.114133,39.785494,-0.000285</coordinates>
</Point>
</Placemark>
<Placemark>
<name>910</name>
<description>(-84.110307,39.788410,-0.000046),V(3.499966,307.390012) at 1.60s</description>
<TimeSpan>
<begin>2012-09-19T08:00:20Z</begin>
<end>2012-09-19T08:00:30Z</end>
</TimeSpan>
<styleUrl>#vehicleStyle</styleUrl>
<Point>
<coordinates>-84.110307,39.788410,-0.000046</coordinates>
</Point>
</Placemark>
</Folder>
...
那么是否有任何解决方案可以使地标连续动画?谢谢。
不考虑 PS Track,因为数据点之间的跟踪信息暂时不可用。