ImageView latestMapEventImageView = null;
// 更新震中位置
private void updateMapEventOverlay() {
mMapEventOverlay.removeAll();
if (latestMapEventImageView != null) {
mMapView.removeView(latestMapEventImageView);
latestMapEventImageView.setImageDrawable(null);
latestMapEventImageView = null;
mMapView.refreshDrawableState();
}
for (int i = 0; i < currentEqEventList.size(); i++) {
String eventId = currentEqEventList.get(i).DzEventId;
String eventLevel = currentEqEventList.get(i).DzLevel;
String eventLongitude = currentEqEventList.get(i).DzLon;
String eventLatitude = currentEqEventList.get(i).DzLat;
float fLevel = 0;
float fLatitude = 0;
float fLongitude = 0; try {
fLevel = Float.parseFloat(eventLevel);
fLongitude = Float.parseFloat(eventLongitude);
fLatitude = Float.parseFloat(eventLatitude);
} catch (Exception e) {
e.printStackTrace();
} // 转GPS坐标为百度坐标
GeoPoint point = CoordinateConvert.fromWgs84ToBaidu(
new GeoPoint((int)(fLatitude * 1e6), (int)(fLongitude * 1e6)));
OverlayItem item = new OverlayItem(point, eventId, "");
TextView mapEventView;
if (fLevel > 6.9) {
// 大圈
mapEventView = (TextView)findViewById(
R.id.mymap_bottombar_control_dzpos_lv3);
} else if (fLevel > 3.9) {
// 中圈
mapEventView = (TextView)findViewById(
R.id.mymap_bottombar_control_dzpos_lv2);
} else {
// 小圈
mapEventView = (TextView)findViewById(
R.id.mymap_bottombar_control_dzpos_lv1);
} mapEventView.setText("" + fLevel);
Bitmap bmpMpuMarket = getBitmapFromView(mapEventView);
Drawable drawableMpuMarket = new BitmapDrawable(
getResources(), bmpMpuMarket); if (i == 0) {
MapView.LayoutParams mapviewLp = new MapView.LayoutParams(
MapView.LayoutParams.WRAP_CONTENT,MapView.LayoutParams.WRAP_CONTENT,
point,MapView.LayoutParams.BOTTOM_CENTER); latestMapEventImageView=new ImageView(mContext);
latestMapEventImageView.setImageResource(R.drawable.map_icon_earthquake_lv3);
//iv.setImageDrawable(drawableMpuMarket);
AlphaAnimation alphaAnimation1 = new AlphaAnimation(0.1f, 1.0f);
alphaAnimation1.setDuration(1000);
alphaAnimation1.setRepeatCount(Animation.INFINITE);
alphaAnimation1.setRepeatMode(Animation.REVERSE);
latestMapEventImageView.setAnimation(alphaAnimation1);
alphaAnimation1.start(); // Animation anim=AnimationUtils.loadAnimation(getApplicationContext(), R.anim.anim_mapevent);
// iv.setAnimation(anim);
mMapView.addView(latestMapEventImageView,mapviewLp);
}
else {
item.setMarker(drawableMpuMarket);
mMapEventOverlay.addItem(item);
} }
mMapView.refresh();
}

  

Android 百度地图2.4.2版本标注动画效果的更多相关文章

  1. Android 百度地图API(01)_开发环境 HelloBaiduMap

    转载于:http://blog.csdn.net/lmj623565791/article/details/37729091 转载于:http://blog.csdn.net/crazy1235/ar ...

  2. Android百度地图相关内容汇总

    Android百度地图知识讲解 1.百度地图开发环境搭建    http://www.apkbus.com/android-116050-1-1.html 2.Android百度地图系列教程    h ...

  3. [android] 百度地图开发 (一).申请AK显示地图及解决显示空白网格问题

        近期做android百度地图,可是使用baidumapapi_v2_3_1.jar和libBaiduMapSDK_v2_3_1.so显示百度地图时总是遇到问题--仅仅显示网格而没有显示地图,网 ...

  4. 百度地图API显示多个标注点并添加百度样式检索窗口

    原作者博客地址:http://blog.csdn.net/a497785609/article/details/24009031 在此基础上进行了修改: 1.添加闭包,将i传入内部 2.添加地图和卫星 ...

  5. Android 百度地图开发(一)--- 申请API Key和在项目中显示百度地图

      标签: Android百度地图API Key  分类: Android 百度地图开发(2)    最近自己想研究下地图,本来想研究google Map,但是申请API key比较坑爹,于是从百度地 ...

  6. Android 百度地图 SDK v3.0.0 (四) 引入离线地图功能

    转载请标明出处:http://blog.csdn.net/lmj623565791/article/details/37758097 一直觉得地图应用支持离线地图很重要啊,我等移动2G屌丝,流量不易, ...

  7. Android 百度地图 SDK v3.0.0 (三) 添加覆盖物Marker与InfoWindow的使用

    转载请标明出处:http://blog.csdn.net/lmj623565791/article/details/37737213 上篇博客已经实现了地图的定位以及结合了方向传感器用户路痴定位方向, ...

  8. Android 百度地图 SDK v3.0.0 (三) 加入覆盖Marker与InfoWindow使用

    转载请注明出处:http://blog.csdn.net/lmj623565791/article/details/37737213 上篇博客已经实现了地图的定位以及结合了方向传感器用户路痴定位方向, ...

  9. 百度地图API显示多个标注点,解决提示信息问题以及给标注增加地图旁的文字连接提示的另一种解决办法

    原文:百度地图API显示多个标注点,解决提示信息问题以及给标注增加地图旁的文字连接提示的另一种解决办法 公司的网站改版要求在一个页面显示百度地图.上面要同时显示很多标注点,标注点当然要有提示信息嘛,提 ...

随机推荐

  1. 【bzoj2734】集合选数(有点思维的状压dp)

    题目传送门:bzoj2734 这题一个月前看的时候没什么头绪.现在一看,其实超简单. 我们对于每个在$ [1,n] $范围内的,没有因数2和3的数$ d $,将它的倍数$ 2^a 3^b d $一起处 ...

  2. docker shipyard 问题

    安装 docker  shipyard curl -s https://shipyard-project.com/deploy | bash -s docker machine 创建的虚拟机无法直接运 ...

  3. hdu 1241 搬寝室 水dp

    搬寝室 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Problem Desc ...

  4. Python 使用sys模块

      你已经学习了如何在你的程序中定义一次函数而重用代码.如果你想要在其他程序中重用很多函数,那么你该如何编写程序呢?你可能已经猜到了,答案是使用模块.模块基本上就是一个包含了所有你定义的函数和变量的文 ...

  5. 使用Mysql Workbench 导入数据库提示 ERROR 1227 (42000) at line 18: Access denied; you need (at least one of) the SUPER privilege(s) for

    今天再复制服务器上数据库的时候(使用Mysql Workbench )提示1227错误, 数据库版本5.7.18,复制到的数据库也是5.7.18. 总结一下网上的几种方法: 方法一: 最直观的翻译是说 ...

  6. uva10002凸包重心

    把每个三角形看成一个质点,坐标就是各自的重心, #include<map> #include<set> #include<cmath> #include<qu ...

  7. 20.并发容器之ArrayBlockingQueue和LinkedBlockingQueue实现原理详解

    1. ArrayBlockingQueue简介 在多线程编程过程中,为了业务解耦和架构设计,经常会使用并发容器用于存储多线程间的共享数据,这样不仅可以保证线程安全,还可以简化各个线程操作.例如在“生产 ...

  8. 玲珑oj 1121 思维

    1121 - Reverse the lights Time Limit:2s Memory Limit:256MByte Submissions:376Solved:111 DESCRIPTION ...

  9. 卸载Linux自带的JDK

    Redhat Enterprise Linux中自带了jdk的旧版本,往往需要卸载,卸载步骤如下: 在终端输入:yum remove java 终端显示:Is this ok[y/N]: 输入y,按回 ...

  10. Highcharts 时间序列,可缩放的图表;Highcharts X 轴翻转曲线图;Highcharts 带标记曲线图

    Highcharts 时间序列,可缩放的图表 配置 图表 配置可缩放图表. chart.zoomType 指定了用户可以拖放的尺寸,用户可以通过拖动鼠标来放大,可能值是x,y或xy: var char ...