当前位置: 移动技术网 > IT编程>移动开发>Android > android开发之百度地图marker点添加,删除,动画等操作实例

android开发之百度地图marker点添加,删除,动画等操作实例

2018年09月14日  | 移动技术网IT编程  | 我要评论

娱乐小亨传奇,当铺网,育儿网官网

android开发之百度地图marker点添加,删除,动画等操作实例

latlng point = new latlng(markx,marky);//坐标参数(纬度,经度)
bitmapdescriptor bitmap = bitmapdescriptorfactory
  .fromresource(r.mipmap.drone);//自定义marker点图片
//构建markeroption,用于在地图上添加marker
overlayoptions option = new markeroptions()
  .position(point)
  .icon(bitmap);
marker = (marker) map.addoverlay(option);//将marker添加到地图,并获取该marker点对象

marker.remove();//删除

alphaanimation animation = new alphaanimation(1.0f,0.0f);//marker点动画(需导入百度地图的animation包)
animation.setduration(3000);
marker.setanimation(animation);
marker.startanimation();
overlayoptions oocircle = new circleoptions().fillcolor(r.color.coloraccent)//地图上已point为中心添加圆
  .center(point).stroke(new stroke(5, r.color.colorprimary)).radius(1400);

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网