百度地图V3.5.0获取可视地图范围中心点、东北方、西南方(右上角、左下角)坐标
2015-07-08 09:26
417 查看
OnMapStatusChangeListener onMapStatusChangeListener=new OnMapStatusChangeListener(){
@Override
public void onMapStatusChange(MapStatus mapStatus) {
// TODO Auto-generated method stub
}
@Override
public void onMapStatusChangeFinish(MapStatus mapStatus) {
// 地图状态改变结束
LatLng target = mapStatus.target;// target地图操作的中心点。
LatLngBounds bound = mapStatus.bound;
LatLng northeast = bound.northeast;//地图东北角百度坐标
LatLng southwest = bound.southwest;//地图西南角百度坐标
}
@Override
public void onMapStatusChangeStart(MapStatus mapStatus) {
// TODO Auto-generated method stub
}
};
mBaiduMap.setOnMapStatusChangeListener(onMapStatusChangeListener);
注:如果没有MapStatus可以用
//mBaiduMap=mMapView.getMap();
LatLngBounds bound = mBaiduMap.getMapStatus().bound;
LatLng northeast = bound.northeast;
LatLng southwest = bound.southwest;
loadGuideNetWork(northeast, southwest);
@Override
public void onMapStatusChange(MapStatus mapStatus) {
// TODO Auto-generated method stub
}
@Override
public void onMapStatusChangeFinish(MapStatus mapStatus) {
// 地图状态改变结束
LatLng target = mapStatus.target;// target地图操作的中心点。
LatLngBounds bound = mapStatus.bound;
LatLng northeast = bound.northeast;//地图东北角百度坐标
LatLng southwest = bound.southwest;//地图西南角百度坐标
}
@Override
public void onMapStatusChangeStart(MapStatus mapStatus) {
// TODO Auto-generated method stub
}
};
mBaiduMap.setOnMapStatusChangeListener(onMapStatusChangeListener);
注:如果没有MapStatus可以用
//mBaiduMap=mMapView.getMap();
LatLngBounds bound = mBaiduMap.getMapStatus().bound;
LatLng northeast = bound.northeast;
LatLng southwest = bound.southwest;
loadGuideNetWork(northeast, southwest);
相关文章推荐
- nginx+php的配置
- 重新开始Linux的学习
- leetcode解题报告232——Implement Queue using Stacks
- 信息系统项目管理师考试心得
- UVa 11375 Matches
- [Html 5] WebStorage - localStorage和sessionStorage 基本使用方法
- [转载] PayPal高级工程总监:读完这100篇论文 就能成大数据高手
- Nhibernate学习
- C语言统计字符个数代码分享
- asp.net获取真实ip的方法
- js字符串常用判断方法
- Makefile文件中的sed介绍
- Struts2中namespace的用法
- Android环境配置
- Summary Ranges
- oracle临时表
- leetCode(34):Reverse Words in a String
- 君子偕老
- Mac OS X的菜单栏真是烂爆了
- leetCode(34):Reverse Words in a String 分类: leetCode 2015-07-08 09:23 124人阅读 评论(0) 收藏