当前位置: 首页 > news >正文

阿里巴巴怎样做网站app外包推广

阿里巴巴怎样做网站,app外包推广,怎么建立一个网站网址,wordpress编辑器 模板前言#xff1a;在android开发过程中#xff0c;百度地图的使用是比较普遍的#xff0c;但是如何使用#xff0c;使用什么版本的百度API还是需要一些讲究。在项目过程中#xff0c;需要用到百度地图的marker和InfoWindow的功能。标注覆盖物(百度地图官方图)布局文件很简单…前言在android开发过程中百度地图的使用是比较普遍的但是如何使用使用什么版本的百度API还是需要一些讲究。在项目过程中需要用到百度地图的marker和InfoWindow的功能。标注覆盖物(百度地图官方图)布局文件很简单主要就是mapview,如下android:layout_widthmatch_parent android:layout_heightmatch_parentandroid:orientationverticalandroid:backgroundcolor/overall_bgandroid:layout_widthmatch_parentandroid:layout_heightwrap_contentandroid:orientationhorizontalandroid:idid/gps_button_resetandroid:layout_width0dpandroid:layout_heightwrap_contentandroid:layout_weight1android:textstring/gps_reset_buttonandroid:layout_marginBottom8dpandroid:layout_marginLeft16dpandroid:layout_marginTop8dpandroid:layout_marginRight16dp/android:idid/gps_button_historyandroid:layout_width0dpandroid:layout_heightwrap_contentandroid:layout_weight1android:textstring/gps_history_buttonandroid:layout_marginBottom8dpandroid:layout_marginLeft16dpandroid:layout_marginTop8dpandroid:layout_marginRight16dp/android:layout_widthmatch_parentandroid:layout_heightwrap_contentandroid:textstring/gps_textandroid:paddingBottom8dpandroid:paddingTop8dpandroid:textSize15spandroid:layout_gravitycenterandroid:gravitycenter/android:idid/bmapViewandroid:layout_widthfill_parentandroid:layout_heightfill_parentandroid:clickabletrue /标注覆盖物实现代码如下/*** 根据手表的经纬度在地图上设置位置更新顶部的位置文字描述*/private void updateLocation(ArrayList list) {/*** 1. 新用户默认显示地址*/double lg 104.06; // 成都市的经纬度double lt 30.67;String location getResources().getString(R.string.fake_position);baiduMap.clear();List potions new ArrayList();for(int i list.size() -1; i 0 ; i--){// gps 非空则设置经纬度、位置的文字描述lg Double.parseDouble(list.get(i).getLongitude());lt Double.parseDouble(list.get(i).getLatitude());location list.get(i).getAddress();//地址太长处理下location location.replace(四川省,).replace(成都市,).replace(.,);final LatLng ll new LatLng(lt, lg); // 注意经纬度顺序/*** 为每个足迹依据先后顺序编号*/int image_id 0;switch (i){case 9: image_id R.mipmap.icon_mark1;break;case 8: image_id R.mipmap.icon_mark2;break;case 7: image_id R.mipmap.icon_mark3;break;case 6: image_id R.mipmap.icon_mark4;break;case 5: image_id R.mipmap.icon_mark5;break;case 4: image_id R.mipmap.icon_mark6;break;case 3: image_id R.mipmap.icon_mark7;break;case 2: image_id R.mipmap.icon_mark8;break;case 1: image_id R.mipmap.icon_mark9;break;case 0: image_id R.mipmap.icon_mark10;break;}BitmapDescriptor descriptor BitmapDescriptorFactory.fromResource(image_id);OverlayOptions options new MarkerOptions().position(ll).icon(descriptor).zIndex(i);Marker marker (Marker) baiduMap.addOverlay(options);//为marker添加识别标记信息Bundle bundle new Bundle();bundle.putSerializable(info, list.get(i));marker.setExtraInfo(bundle);MapStatusUpdate update MapStatusUpdateFactory.newLatLngZoom(ll,17);baiduMap.setMapStatus(update);}为标记的marker添加监听点击时实现弹出infowindow。(infowindow每次最多显示一条信息)/*** 为标记添加监听* 点击弹出地理位置信息*/baiduMap.setOnMarkerClickListener(new BaiduMap.OnMarkerClickListener() {Overridepublic boolean onMarkerClick(Marker marker) {// 获得marker中的数据GPSBean info (GPSBean) marker.getExtraInfo().get(info);// 生成一个TextView用户在地图中显示InfoWindowTextView location new TextView(getApplicationContext());location.setBackgroundResource(R.mipmap.gps_button);location.setPadding(15, 15, 8, 35);location.setTextColor(Color.DKGRAY);location.setText(定位时间 info.getUploadTime() \n info.getAddress());location.setTextSize(12);// 将marker所在的经纬度的信息转化成屏幕上的坐标final LatLng ll marker.getPosition();Point p baiduMap.getProjection().toScreenLocation(ll);p.y - 47;LatLng llInfo baiduMap.getProjection().fromScreenLocation(p);// 为弹出的InfoWindow添加点击事件mInfoWindow new InfoWindow(location,llInfo, new InfoWindow.OnInfoWindowClickListener() {Overridepublic void onInfoWindowClick() {baiduMap.hideInfoWindow();}});// 显示最后一条的InfoWindowbaiduMap.showInfoWindow(mInfoWindow);return true;}});最后将地图显示到最新的数据并且显示Infowindow。/*** 显示最后一个地理位置信息* 创建InfoWindow展示的view*/private void updateBaidumapInfowindown(String location,double lt, double lg){TextView textView new TextView(getApplicationContext());textView.setBackgroundResource(R.mipmap.gps_button);textView.setPadding(15, 15, 8, 35);textView.setTextColor(Color.DKGRAY);textView.setText(location);textView.setTextSize(12);final LatLng ll new LatLng(lt,lg);mInfoWindow new InfoWindow(textView, ll, new InfoWindow.OnInfoWindowClickListener() {Overridepublic void onInfoWindowClick() {baiduMap.hideInfoWindow();}});//显示InfoWindowbaiduMap.showInfoWindow(mInfoWindow);/*** 将地图视野移动最新的位置*/MapStatusUpdate update MapStatusUpdateFactory.newLatLngZoom(ll,17);baiduMap.setMapStatus(update);}至此可以完成。但是还有最重要的一点则是百度Api版本的问题本方法在新版本 3.4.1 似乎就不能用这种方法实现只能使用3.0.0版本。
http://wiki.neutronadmin.com/news/241147/

相关文章:

  • 做网站卖机器能看所有网站的浏览器
  • 浙江网站建设方案广西网络干部学院官网
  • 网站配色 原则专业的网站制作公司
  • 京东联盟怎么做CMS网站wordpress调用标签大全
  • 做微网站需要域名吗网站的建设与维护
  • 西宁网站制作做旅游产品的网站有哪些
  • 做响应网站的素材网站有哪些什么是网络营销网络营销的特点有哪些
  • 网站制作的前期主要是做好什么工作彩虹网站建设
  • 最新的网站搭建工具汕尾网站网站建设
  • 南阳做网站公司哪家好国外网站流量查询
  • 外贸建站系统源码保山市住房和城乡建设厅网站
  • 网站设置搜索关键字江苏交通建设监理协会网站
  • 网站建设毕业设计说明书word文档12个优秀的平面设计素材网站
  • 企业网站的作用和意义外包员工强制辞退找谁赔偿
  • 酷站海洛重庆合川企业网站建设
  • 自己的域名搭建网站分类目录seo wordpress
  • 做网站需要神虚拟主机如何搭建网站
  • 珠海专业做网站制作专业广州网站建设
  • 中国建设行业信息网站针对人群不同 网站做细分
  • 网站建设幽默做单机游戏破解的网站
  • 网站怎么进入网站建设软件哪个最好
  • 做传销网站的程序员犯法吗网址导航大全
  • 网站推广名片如何注册网站的名字
  • 凡科网建站系统源码vs2012网站开发
  • 台州品牌网站建设市场营销策略论文参考文献
  • 云南智能建站百度指数对比
  • 做网站深圳搭建网站有哪些
  • 万维网官方网站官方网站下载水印相机
  • 网站建设的关键问题图书馆网站建设情况总结
  • 科技成果转化网站建设方案江苏建设招投标网