Android 百度地图2.4.2版本标注动画效果
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版本标注动画效果的更多相关文章
- Android 百度地图API(01)_开发环境 HelloBaiduMap
转载于:http://blog.csdn.net/lmj623565791/article/details/37729091 转载于:http://blog.csdn.net/crazy1235/ar ...
- Android百度地图相关内容汇总
Android百度地图知识讲解 1.百度地图开发环境搭建 http://www.apkbus.com/android-116050-1-1.html 2.Android百度地图系列教程 h ...
- [android] 百度地图开发 (一).申请AK显示地图及解决显示空白网格问题
近期做android百度地图,可是使用baidumapapi_v2_3_1.jar和libBaiduMapSDK_v2_3_1.so显示百度地图时总是遇到问题--仅仅显示网格而没有显示地图,网 ...
- 百度地图API显示多个标注点并添加百度样式检索窗口
原作者博客地址:http://blog.csdn.net/a497785609/article/details/24009031 在此基础上进行了修改: 1.添加闭包,将i传入内部 2.添加地图和卫星 ...
- Android 百度地图开发(一)--- 申请API Key和在项目中显示百度地图
标签: Android百度地图API Key 分类: Android 百度地图开发(2) 最近自己想研究下地图,本来想研究google Map,但是申请API key比较坑爹,于是从百度地 ...
- Android 百度地图 SDK v3.0.0 (四) 引入离线地图功能
转载请标明出处:http://blog.csdn.net/lmj623565791/article/details/37758097 一直觉得地图应用支持离线地图很重要啊,我等移动2G屌丝,流量不易, ...
- Android 百度地图 SDK v3.0.0 (三) 添加覆盖物Marker与InfoWindow的使用
转载请标明出处:http://blog.csdn.net/lmj623565791/article/details/37737213 上篇博客已经实现了地图的定位以及结合了方向传感器用户路痴定位方向, ...
- Android 百度地图 SDK v3.0.0 (三) 加入覆盖Marker与InfoWindow使用
转载请注明出处:http://blog.csdn.net/lmj623565791/article/details/37737213 上篇博客已经实现了地图的定位以及结合了方向传感器用户路痴定位方向, ...
- 百度地图API显示多个标注点,解决提示信息问题以及给标注增加地图旁的文字连接提示的另一种解决办法
原文:百度地图API显示多个标注点,解决提示信息问题以及给标注增加地图旁的文字连接提示的另一种解决办法 公司的网站改版要求在一个页面显示百度地图.上面要同时显示很多标注点,标注点当然要有提示信息嘛,提 ...
随机推荐
- "ImportError: cannot import name OVSLegacyKernelSwitch"
My VirtualMachine OS is Ubuntu14.04, Linux. Recently I want to install the mininet in my OS, and I u ...
- Object.defineProperties——MEAN开发后台的Model层
Object.defineProperties是什么?有什么用? 这个问题比较听起来可能比较难以理解,确实我也是在项目中遇到的才会去想.以前看到<高级程序设计>的时候,有这么一种东西,定义 ...
- 03_zookeeper伪集群安装
一句话说明白:在1台机器上模拟多台机器,对外提供服务 在理解zookeeper集群安装方法的基础上,本文描述如何将1个机器模拟为3个节点的zookeeper集群,建议先参考阅读本文的前一期 zooke ...
- Yii框架(一)
这里接触了 MVC 设计模式中的控制器和视图部分. 创建了一个操作作为控制器的一部分去处理特定请求. 然后又创建了一个视图去构造响应内容. 在这个小例子中,没有模型调用,唯一涉及到数据的地方是 mes ...
- 常见HTTP状态(304,)
一.1XX(临时响应) 表示临时响应并需要请求者继续执行操作的状态码. 100(继续) 请求者应当继续提出请求.服务器返回此代码表示:已经收到请求的第一部分,正在等待其余部分. 101(切换协议) 请 ...
- zoom:1;
zoom:1;属性是IE浏览器的专有属性,可以设置或检索对象的缩放比例.触发ie的hasLayout属性.清除浮动.清除magin的重叠等. 注意:它未通过W3C验证.
- python学习笔记(字典乱码)
博主总结下 python中字典中包含中文时,使用过程中出现乱码 json.dumps(params, encoding="UTF-8", ensure_ascii=False) p ...
- Apache 2 移植到Arm开发板
第一步,安装pcre: tar -xvzf pcre-8.31.tar.gz cd pcre-8.31 ./configure --prefix=$ARMROOTFS/usr/pcre 的错误,如下图 ...
- javascript中的__proto__ 和prototype
不错的一张图
- 【转】正向代理vs反向代理
正向代理 正向代理:是一个位于客户端和原始服务器(origin server)之间的服务器,为了从原始服务器取得内容,客户端向代理发送一个请求并指定目标(原始服务器),然后代理向原始服务器转交请求并将 ...