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(安卓)App的相对布局Relative
  2. Android(安卓)Touch事件模型
  3. android 加密 SQLCipher和Conceal
  4. 关于Android(安卓)RenderScript 的详细说
  5. 微信 Tinker 负责人张绍文关于 Android(
  6. 死磕 android 设备识别码
  7. unity调用android语音识别
  8. Android用户不想让iOS用户知道的9个杀手
  9. Android——ECG心电图的绘制实现(二)
  10. Android分类列表之ListView-ViewType实现