如何仅显示Android mapview的卫星视图

时间:2012-02-27 07:18:04

标签: android android-mapview satellite

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

有人可以告诉我如何删除卫星视图上方的道路和名称吗?

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

我读了Class MapView:

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

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

2 个答案:

答案 0 :(得分:3)

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. 

答案 1 :(得分:0)

我不相信这可以实现,因为当您使用谷歌mapview时,图片来自谷歌自己的路线图和卫星地图,除非他们做的更新API只显示没有卫星图像道路名称​​。