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. jar包中使用log4j2不起作用

    某程序中有使用到log4j2,将该程序打包成jar,使用以下命令执行时,发现log4j不输出 java -cp Tool.jar com.zhen.nameOnce.Log4jTest 且报以下错误 ...

  2. 04_Storm编程上手_WordCount集群模式运行

    1. 要解决的问题:代码打包 前一篇的代码,在IDEA中通过maven工程创建,通过IDEA完成代码打包 1)File -> Project Structure  2) 选择Artifacts, ...

  3. java 之 find 命令

    转自:https://blog.csdn.net/holyshit666/article/details/52296966 find命令是比较常用的命令,用来在特定目录下查找具有某种特征的文件. 一: ...

  4. mac 下如何建立vue-cli项目

    command+space : terminal //检测是否存在node node -v //检测是否带有npm安装管理工具 npm -v //具备进行下一步 //在documnets下建立vue文 ...

  5. maven笔记(4)

    项目管理利器(Maven)——依赖范围(classPath:编译,运行,测试)1.compile:默认范围,编译测试运行都有效2.provided:在编译和测试时有效3.runtime:在测试和运行时 ...

  6. 设计模式--观察者模式C++实现

    观察者模式C++实现 1定义 Observer/Publish/subscribe发布订阅模式 定义对象间一种一对多的依赖关系,使得当一个对象改变状态时,所有依赖他的对象都能获得通知并被自动更新 2类 ...

  7. hdu3544找规律

    如果x>1&&y>1,可以简化到其中一个为1的情况,这是等价的,当其中一个为1(假设为x),另一个一定能执行y-1次, 这是一个贪心问题,把所有的执行次数加起来比较就能得到 ...

  8. gitflow工作流程基本命令使用

    1 基础命令: 初始化: git flow init 开始新Feature: git flow feature start MYFEATURE Publish一个Feature(也就是push到远程) ...

  9. MFC sendmessage实现进程间通信

    用sendmessage实现进程间通信. 1.WM_COPYDATA实现进程间通信 实现方式是发送WM_COPYDATA消息. 发送程序: LRESULT copyDataResult; //copy ...

  10. Java中操作Redis

    一.server端安装 1.下载 https://github.com/MSOpenTech/redis 可看到当前可下载版本:redis2.6 下载后的文件为: 解压后,选择当前64位win7系统对 ...