android - map View 开始位置

标签 android google-maps google-maps-api-3

下午好

当我启动我的应用程序时, map View 显示如下图所示:

enter image description here

但我想在某些点开始放大 map View ,类似于此:

enter image description here

我需要使用哪种方法?

提前致谢。

最佳答案

您向 map Controller 添加缩放级别:

mapView.getController().setZoom(17); // an int that suits you

在此处阅读有关缩放级别的更多信息:https://developers.google.com/maps/documentation/staticmaps/#Zoomlevels

要设置中心,您可以使用:

 mapView.getController().setCenter(new GeoPoint(latitude,longitude));

关于android - map View 开始位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15342604/

相关文章:

ios - 使用 Google map 和 Apple map URL 方案自动开始导航

JavaScript/SASS : How to override default width of Google Maps API v3 Autocomplete dropdown based on width of input field?

android - 如何在android中的谷歌地图上绘制动态旅行路径

javascript - 在谷歌地图上拖动标记时有没有办法强制 Dragend 事件

android - Add an item at current progressBar position - 创建自定义进度条

java - Android Apache Logger 在生产(发布版本)中无故崩溃

android - 如何使 android 缩放控件像内置缩放控件一样自动消失

android - iFrame allowFullScreen 属性在 Android WebView 上不起作用

c# - 换行符在 javascript 谷歌地图标签中不起作用

javascript - 如何在 google map api v3 中使用 if 条件检查两个 LatLng 值?