mapView的xml
<view android:id="@+id/mv"
class="com.google.android.maps.MapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:apiKey="0yxPVuoWg4JGeXCpA3WaJCnbiR2lLfCC_yCTqfA"
/>

mapController = mapView.getController();
map控制器似乎是控制地图移动的,缩放和中心位置都通过他设定

放大: mapController.zoomIn();
缩小: mapController.zoomOut();
向北: GeoPoint point = new GeoPoint(mapView.getMapCenter()
.getLatitudeE6()
+ mapView.getLatitudeSpan() / 4, mapView.getMapCenter()
.getLongitudeE6());
mapController.setCenter(point);
=================小贴士===================================
如果只是想把点放到地图上,而不是让map以点为中心显示,做法是
mapController.animateTo(point);//激活就可以了
mapController.setCenter(point);//激活并放到视图中间

东南西北都是在经度和纬度上改变下


设置街景视图: mapView.setSatellite(false);
mapView.setStreetView(true);
mapView.setTraffic(false);
街景,交通,卫星三个视图类似


更多相关文章

  1. 【Android(安卓)UI】Android开发之View的几种布局方式及实践
  2. Android自定义视图四:定制onMeasure强制显示为方形
  3. android. MVC三层分层
  4. [Android]LayoutInflater的inflate方法半详解
  5. Android(安卓)自定义控件
  6. android之高德地图学习
  7. Google:五亿Android设备激活
  8. Unity3D游戏开发之在Android视图中嵌入Unity视图
  9. Android游戏框架与常识

随机推荐

  1. Android多进程之Binder解绑监听的问题
  2. android layout属性介绍
  3. Android中资源文件的Shape使用总结
  4. 理解 Android(安卓)Build 系统
  5. Android(安卓)GWES之Android窗口管理
  6. 二、android百度地图定位显示当前位置(an
  7. Android环境变量配置
  8. Android中gravity与layout_gravity的区别
  9. 使用Android(安卓)adb命令来启动Android
  10. android textview