首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何仅显示Android mapview的卫星视图

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

Stack Overflow用户
提问于 2012-02-27 15:18:04
回答 2查看 10.4K关注 0票数 0

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

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

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

我读过MapView类:

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

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

EN

回答 2

Stack Overflow用户

发布于 2012-02-28 18:04:54

代码语言:javascript
复制
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,,尽管它说它已经被弃用了,它对我来说还行

代码语言:javascript
复制
@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. 
票数 3
EN

Stack Overflow用户

发布于 2012-02-27 20:37:34

我不相信这是可以做到的,因为当你使用google mapview时,图片来自谷歌自己的路线图和卫星地图,除非他们对API进行更新,只显示没有道路名称的卫星图片。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9461299

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档