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显示多个标注点,解决提示信息问题以及给标注增加地图旁的文字连接提示的另一种解决办法 公司的网站改版要求在一个页面显示百度地图.上面要同时显示很多标注点,标注点当然要有提示信息嘛,提 ...
随机推荐
- java for语句执行顺序
public class test{ public static void main(String[] args) { int i=0; for(printChar ...
- heartbeat 编译安装配置
一.heartbeat介绍 heartbeat是HA高可用集群的一个重要组件,heartbeat实现了资源转移和心跳信息传递.它的常用组合方式为heartbeat v1,heartbeat v2+cr ...
- FASTQ format
FASTQ format 每个FASTQ文件中每个序列通常有四行信息: 1: 以 '@' 字符开头,后面紧接着的是序列标识符和可选字段的描述(类似FASTA title line). 2: 序列 3: ...
- 爬虫框架Scrapy之案例三图片下载器
items.py class CoserItem(scrapy.Item): url = scrapy.Field() name = scrapy.Field() info = scrapy.Fiel ...
- nodejs中mysql断线重连
之前写了个小程序Node News,用到了MySQL数据库,在本地测试均没神马问题.放上服务器运行一段时间后,偶然发现打开页面的时候页面一直处于等待状态,直到Nginx返回超时错误.于是上服务器检查了 ...
- 河南省多校联盟二-A
1279: 简单的背包问题 时间限制: 1 秒 内存限制: 32 MB提交: 361 解决: 20 题目描述 相信大家都学过背包问题了吧,那么现在我就考大家一个问题.有n个物品,每个物品有它的重量 ...
- UVA-10047 The Monocycle (图的BFS遍历)
题目大意:一张图,问从起点到终点的最短时间是多少.方向转动也消耗时间. 题目分析:图的广度优先遍历... 代码如下: # include<iostream> # include<cs ...
- @Primary-在spring中常被忽视的注解
在spring 中使用注解,常使用@Autowired, 默认是根据类型Type来自动注入的.但有些特殊情况,对同一个接口,可能会有几种不同的实现类,而默认只会采取其中一种的情况下 @Primary ...
- spring boot 中logback多环境配置
spring boot 配置logback spring boot自带了log打印功能,使用的是Commons logging 具体可以参考spring boot log 因此,我们只需要在resou ...
- IOS-源代码管理工具(Git)
一.简介 什么是git? git是一款开源的分布式版本控制工具 在世界上所有的分布式版本控制工具中,git是最快.最简单.最流行的 git的起源 作者是Linux之父:Linus Benedict ...