【问题标题】:how to set default zoom level in android google map?如何在 android 谷歌地图中设置默认缩放级别?
【发布时间】:2010-03-01 05:58:11
【问题描述】:

我想将谷歌地图中的默认缩放级别设置为 11 英里 谁能指导我如何实现这一目标?

如有任何帮助,将不胜感激。

【问题讨论】:

    标签: android google-maps


    【解决方案1】:

    类似这样的:

    MaView mapView = (MapView)findViewById(R.id.my_map);
    MapController mapController = mapView.getController();
    mapController.setZoom(14);    // this isn't 11 miles.
    

    或者你有MapActivity?在这种情况下,想法是相同的,但您会得到不同的 MapView

    【讨论】:

      【解决方案2】:

      newLatLngZoom() 是设置缩放级别的方法。 14f 是缩放级别。

         mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(marker, 14F))
      

      【讨论】:

        猜你喜欢
        • 2019-01-10
        • 1970-01-01
        • 2012-07-12
        • 1970-01-01
        • 1970-01-01
        • 2017-04-10
        • 2013-02-27
        • 1970-01-01
        相关资源
        最近更新 更多