本文整理汇总了Java中com.amap.api.maps.model.Marker.startAnimation方法的典型用法代码示例。如果您正苦于以下问题:Java Marker.startAnimation方法的具体用法?Java Marker.startAnimation怎么用?Java Marker.startAnimation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.amap.api.maps.model.Marker
的用法示例。
在下文中一共展示了Marker.startAnimation方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addClusterToMap
import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
/**
* 将聚合元素添加至地图上
*/
private void addClusterToMap(List<Cluster> clusters) {
ArrayList<Marker> removeMarkers = new ArrayList<>();
removeMarkers.addAll(mAddMarkers);
AlphaAnimation alphaAnimation=new AlphaAnimation(1, 0);
MyAnimationListener myAnimationListener=new MyAnimationListener(removeMarkers);
for (Marker marker : removeMarkers) {
marker.setAnimation(alphaAnimation);
marker.setAnimationListener(myAnimationListener);
marker.startAnimation();
}
for (Cluster cluster : clusters) {
addSingleClusterToMap(cluster);
}
}
示例2: addSingleClusterToMap
import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
/**
* 将单个聚合元素添加至地图显示
*
* @param cluster
*/
private void addSingleClusterToMap(Cluster cluster) {
LatLng latlng = cluster.getCenterLatLng();
MarkerOptions markerOptions = new MarkerOptions();
markerOptions.anchor(0.5f, 0.5f)
.icon(getBitmapDes(cluster)).position(latlng);
Marker marker = mAMap.addMarker(markerOptions);
marker.setAnimation(mADDAnimation);
marker.setObject(cluster);
marker.startAnimation();
cluster.setMarker(marker);
mAddMarkers.add(marker);
}
示例3: addClusterToMap
import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
/**
* 将聚合元素添加至地图上
*/
private void addClusterToMap(List<Cluster> clusters) {
ArrayList<Marker> removeMarkers = new ArrayList<>();
removeMarkers.addAll(mAddMarkers);
AlphaAnimation alphaAnimation = new AlphaAnimation(1, 0);
MyAnimationListener myAnimationListener = new MyAnimationListener(removeMarkers);
for (Marker marker : removeMarkers) {
marker.setAnimation(alphaAnimation);
marker.setAnimationListener(myAnimationListener);
marker.startAnimation();
}
for (Cluster cluster : clusters) {
addSingleClusterToMap(cluster);
}
}
示例4: addSingleClusterToMap
import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
/**
* 将单个聚合元素添加至地图显示
*
* @param cluster
*/
private void addSingleClusterToMap(Cluster cluster) {
LatLng latlng = cluster.getCenterLatLng();
MarkerOptions markerOptions = new MarkerOptions();
markerOptions.anchor(0.5f, 0.5f).icon(getBitmapDes(cluster.getClusterCount())).position(latlng);
Marker marker = mAMap.addMarker(markerOptions);
marker.setAnimation(mADDAnimation);
marker.setObject(cluster);
marker.startAnimation();
cluster.setMarker(marker);
mAddMarkers.add(marker);
}
示例5: addSingleClusterToMap
import com.amap.api.maps.model.Marker; //导入方法依赖的package包/类
/**
* 将单个聚合元素添加至地图显示
*
* @param cluster
*/
private void addSingleClusterToMap(Cluster cluster) {
LatLng latlng = cluster.getCenterLatLng();
MarkerOptions markerOptions = new MarkerOptions();
markerOptions.anchor(0.5f, 0.5f)
.icon(getBitmapDes(cluster.getClusterCount())).position(latlng);
Marker marker = mAMap.addMarker(markerOptions);
marker.setAnimation(mADDAnimation);
marker.setObject(cluster);
marker.startAnimation();
cluster.setMarker(marker);
mAddMarkers.add(marker);
}