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显示多个标注点,解决提示信息问题以及给标注增加地图旁的文字连接提示的另一种解决办法 公司的网站改版要求在一个页面显示百度地图.上面要同时显示很多标注点,标注点当然要有提示信息嘛,提 ...
随机推荐
- svn的分支
svn的分支使用 新建一个项目的时候,选择建立自带trunk,branches和tags文件夹的. 其中trunk作为主开发. 有需要的时候,从trunk创建分支到对应的branches下面,新建分支 ...
- Tachyon:Spark生态系统中的分布式内存文件系统
转自: http://www.csdn.net/article/2015-06-25/2825056 摘要:Tachyon把内存存储的功能从Spark中分离出来, 使Spark可以更专注计算的本身, ...
- C# 往string [] arr 数组插入元素
string [] arr ; List<string> _list = new List<string>(arr ); for(int i ;i<10;i++) { _ ...
- TCP状态切换流程
enum { /* * Description of States: * * TCP_SYN_SENT sent a connection request, waiting for ack * * T ...
- Asp.Net MVC 请求原理分析
分析Asp.Net MVC的请求过程,我们从以下几方面看: 配置:IIS网站的配置可以分为两个块:全局 Web.Config 和本站 Web.Config . Asp.Net Routing属于全局性 ...
- Maven 一段时间知识小结2
父 Pom.xml <parent> <groupId>org.springframework.boot</groupId> <artifactId>s ...
- Centos7.2 FastDFS_V5.05 集群的安装与配置1
环境: Centos 7.2/64位 两台服务器 都为tracker 和 storage 10.100.0.1 storage tracker10.100.0.2 storage tracker ...
- [Vue]使用 vue-i18n 切换中英文
1.引入 vue-i18n import Vue from 'vue' import VueI18n from 'vue-i18n' import merge from 'lodash/merge' ...
- Android实现布局控件自定义属性
一.自定义ViewGroup 1.onMeasure 决定内部View(子View)的宽度和高度,以及自己的宽度和高度 2.onLayout 决定子View放置的位置 3.onTouchEvent 定 ...
- [转]RGB数据保存为BMP图片
转自:http://blog.csdn.net/yixianfeng41/article/details/52591585 一.BMP文件由文件头.位图信息头.颜色信息和图形数据四部分组成. 1.BM ...