【发布时间】:2014-04-01 13:34:57
【问题描述】:
我正在绘制带有标签的地标,然后我会持续更新它,每秒一次。地标图标本身没有动画,但附加的标签有。该图标会立即出现,并且在删除旧图标并添加新图标时,没有动画。然而,地标标签在文本淡入视图的位置绘制时有一点动画。每次我删除旧地标并添加新地标时,我都会得到这个动画。如何停止动画?
// Create the placemark.
var placemark = ge.createPlacemark('');
placemark.setName(object1['Designation']);
// Define a custom icon.
var icon = ge.createIcon('');
icon.setHref('http://maps.google.com/mapfiles/kml/paddle/red-circle.png');
var style = ge.createStyle(''); //create a new style
style.getIconStyle().setIcon(icon); //apply the icon to the style
placemark.setStyleSelector(style); //apply the style to the placemark
// Set the placemark's location.
var point = ge.createPoint('');
point.setLatitude(12.345);
point.setLongitude(54.321);
placemark.setGeometry(point);
// Add the placemark to Earth.
ge.getFeatures().appendChild(placemark);
【问题讨论】:
标签: google-maps google-maps-api-3 kml google-earth-plugin