【问题标题】:How to show satellite view of Android mapview only如何仅显示 Android mapview 的卫星视图
【发布时间】:2012-02-27 07:18:04
【问题描述】:

在 2011 年中设置 mapView.setSattelite(true) 将只显示卫星视图,但最近我们发现相同的设置也会在卫星视图上方显示道路和名称。 可能在其他国家/地区非常有用,但在中国,当在卫星视图上方添加道路和名称时,道路不在正确的位置。

谁能告诉我如何删除卫星视图上方的道路和名称?

如何仅显示 Android 地图视图的卫星视图。

我读了类 MapView:

setSatellite(boolean on) 将地图模式设置为“卫星”模式,加载叠加了道路和名称的航空影像图块。

有人可以帮帮我吗?帮助我们在火星上生活!

【问题讨论】:

    标签: android android-mapview satellite


    【解决方案1】:
    public void myClickHandler(View target) {
            switch(target.getId()) {
            /*case R.id.zoomin:
                mapView.getController().zoomIn();
                break;
            case R.id.zoomout:
                mapView.getController().zoomOut();
                break;*/
            case R.id.sat:
                this.mapView.setSatellite(true);
                break;
            case R.id.street:
                this.mapView.setStreetView(true);
                break;
            case R.id.traffic:
                this.mapView.setTraffic(true);
                break;
            case R.id.normal:
                this.mapView.setSatellite(false);
                this.mapView.setStreetView(false);
                this.mapView.setTraffic(false);
                break;
            default:
                break;
            }
    
            // The following line should not be required but it is,
            // at least up til Froyo.
            this.mapView.postInvalidateDelayed(2000);
        }
    

    我相信你需要 setStreetView,尽管它说它已被弃用,但它对我来说没问题

    @Deprecated
    public void setStreetView(boolean on)
    Deprecated. Street view availability highlighting is no longer supported. This method operates as a no-op. 
    
    Control whether Street View availability (blue outlines) is shown on the map. This is incompatible with Traffic indicators, so they will be deactivated if necessary. Street View availability can be drawn over map tiles or over satellite tiles; however, they are optimized for map tiles. 
    

    【讨论】:

    • 我之前使用 setStreetView(false) 和 setSatellite(true),但它不适合我。
    【解决方案2】:

    我不相信这可以实现,因为当您使用 google mapview 时,图像来自 google 自己的路线图和卫星地图,除非他们对 API 进行更新以仅显示没有道路名称的卫星图像.

    【讨论】:

    • 感谢您的回复。我们希望 google 增加关于 setRoadMap(boolean on) 之类的 API 的新功能,这对我们非常有用。您知道如何通过电子邮件联系 google mapview 工程师吗?我们想向他们寻求帮助。顺便问一下,我们还有其他选择只能获取卫星视图吗?
    • 仍然没有找到解决方案。这是未解决的问题http://code.google.com/p/android/issues/detail?id=22405
    猜你喜欢
    • 1970-01-01
    • 2012-05-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-29
    • 2011-08-24
    相关资源
    最近更新 更多