ArcGIS Runtime for Android开发教程V2.0(5)基础篇---图层

<com.esri.android.map.MapView
  		android:id="@+id/map"
  		android:layout_width="fill_parent"
  		android:layout_height="fill_parent"
  		url="http://www.arcgis.com/home/item.html?id=2b571d8c079d46b4a14a67df42b1da6f"
  		appId="">
  	</com.esri.android.map.MapView>


        图层是空间数据的载体,通过图层我们可以把地图数据读取到图层中进行显示,在GIS中图层是很重要的概念,图层只有添加到MapView对象中才可以显示加载的地图数据,在ArcGIS Runtime for Android中有许多种图层,不同的图层有不同的作用,下图是图层的关系图:

 

1、 ArcGISTiledMapServiceLayer

        在ArcGIS Server中我们可以发布多种地图服务,移动端需要有不同的图层来对应这些服务。ArcGISTiledMapServiceLayer图层对应ArcGIS Server服务中的切片服务,由于地图服务是切片式的所以它的优势是加载速度快,用法如下:

MapView mv = new MapView(this);
mv.addLayer(new ArcGISTiledMapServiceLayer( "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"));
 setContentView(mv);
2、 ArcGISDynamicMapServiceLayer

        ArcGISDynamicMapServiceLayer图层对应ArcGIS Server服务中的动态服务,动态地图服务的地图图像是按照移动设备范围读取的,用法如下:

MapView mv = new MapView(this);
mv.addLayer(new ArcGISDynamicMapServiceLayer( "http://samplese
  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值