高德地图

高德地图LBS

网址:http://api.amap.com

1.定位

  • MapView aMap;
  • aMap.setMapType(AMap.MAP_TYPE_NORMAL);
  • //AMap.MAP_TYPE_SATELLITE    AMap.MAP_TYPE_NIGHT
  • // 交通图
  • aMap.setTrafficEnabled(true);
  • LocationManagerProxy proxy = …getIns();
  • 实现 AMapLocationListener接口
  • //注册定位   这里是网络定位    -1表示单次定位
  • proxy.requestLocationData(LocationProviderProxy.AMapNetwork,60*1000,15);

2.地理围栏

  • Intent intent = new Intent(GEOFENCE_BROADCAST_ACTION);//广播
  • PendingIntent mIntent = PendingIntent.getBroadcaset( getAppplicationContext(),0,intent);
  • proxy.addGeoFenceAlert(lat,lng,1000,1000*60,mIntent);//注册地理围栏监听

3.天气

- 接口  AMapLocalWeatherListener

proxy.requestWeatherUpdates(LocationManagerProxy.WEATHER_TYPE_LIVE,

this);

4.add marker

MarkerOptions markerOptions = new MarkerOptions();

markerOptions.position(new LatLng(39.90503, 116.107535));

markerOptions.icon(BitmapDescriptorFactory

.fromResource(R.drawable.ic_launcher));

Marker marker = aMap.addMarker(markerOptions);

marker.setRotateAngle(45);

5.draw line

PolylineOptions polylineOptions = new PolylineOptions();

polylineOptions.add(new LatLng(39.90503, 116.107535), new LatLng(

35.90503, 114.107535));

polylineOptions.color(Color.RED);

polylineOptions.setDottedLine(true);

polylineOptions.width(10);

aMap.addPolyline(polylineOptions);

6.drawCirCle

CircleOptions circleOptions = new CircleOptions();

circleOptions.center(new LatLng(39.90503, 116.107535));

circleOptions.radius(100);

circleOptions.fillColor(Color.BLACK);

aMap.addCircle(circleOptions);


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值