【转】ArcGIS API for Silverlight/WPF 2.1学习笔记(三)
六、Feature Layer
Feature Layer是一种特殊的Graphics layer(继承自Graphics layer),除了像Graphics layer一样包含和显示Graphic features,还能提供:
Editing——编辑(editing控件包含在ArcGIS Toolkit库中,通过feature service来编辑feature layer)
Definition expressions——通过where子句,条件显示某些feature
Time definitions——通过time-aware layer的时间定义,条件显示某些feature
Selection——通过feature的子集,达到显示、编辑、分析的目的
feature layer的三种服务源:
|
Feature layer source |
描述 |
|
ArcGIS Server map service |
Dynamic (non-cached) ArcGIS Server map services能包含多个feature layers,如:http://./ArcGIS/rest/services/./MapServer/8 |
|
ArcGIS Server feature service |
如:http://. /ArcGIS/rest/services/./FeatureServer/0 当feature layer在ArcSDE geodatabase中时,支持编辑 |
|
MapIt |
Mapit包含REST-ful Web service,其table可能spatially-enabled。 Mapit layers不支持Editing和time-awareness。 如:http://./SDS/databases/Demo/dbo.USStates_Geographic |
Feature layers的关键成员|属性:(仅Feature layers支持,Graphics layers不支持)
|
Feature layers成员 |
描述 |
|
Url |
服务的url |
|
Where |
Query条件显示。where(“1=1”)显示全部 |
|
Mode |
定义获取features的方式: Snapshot:获取所有feature,用于较小的datasets或临时data On Demand:返回当前视窗范围内的feature Selection Only:初始不返回任何feature,仅仅在作出selection后才返回 |
|
OnDemandCacheSize |
当Mode=On Demand时,定义客户端缓存大小,用来缓存当前视窗外的feature |
|
FeatureSymbol |
定义一个单独symbol,用于rendering一个单独的Graphics时 |
|
SelectionColor |
定义feature layer中selected graphic features的颜色 |
|
TimeExtent |
实例化或范围显示feature layer的时间。 该属性为只读,定义于ArcGIS Server map或feature service中。 |
|
DisableClientCaching |
是否允许客户端缓存。默认为true,不能自动更新客户端显示。 |
|
Update |
更新客户端显示,用于layer或table contents发生改变时。 |
Feature layer应用
//添加Symbol命名空间,需要定义Symbol给FeatureSymbol属性
xmlns:esriSymbols="clr-namespace:ESRI.ArcGIS.Client.Symbols;assembly=ESRI.ArcGIS.Client
//定义Symbol
<Grid.Resources>
<esriSymbols:SimpleMarkerSymbol x:Name="MyMarkerSymbol" Color="Green" Style="Diamond" Size="14" />
</Grid.Resources>
//定义FeatureLayer
<esri:Map x:Name="MyMap" Extent="-130,10,-70,60" >
<esri:Map.Layers>
<esri:FeatureLayer ID=""
Url="http://./ArcGIS/rest/services/./MapServer/0"
Where="POP1990 > 75000"
FeatureSymbol="{StaticResource MyMarkerSymbol}" >
</esri:FeatureLayer>
</esri:Map.Layers>
</esri:Map>
效果如下图:各feature叠加在一起,不能有效的反应实际数量。

故采用Clustering方式改进(设置ClusterFeatures属性实现):
//添加命名空间
xmlns:esriSymbols="clr-namespace:ESRI.ArcGIS.Client.Symbols;assembly=ESRI.ArcGIS.Client
xmlns:sys="clr-namespace:System;assembly=mscorlib”
//定义Symbol
<Grid.Resources>
<esriSymbols:SimpleMarkerSymbol x:Name="MyMarkerSymbol" Color="Green" Style="Diamond" Size="14" />
</Grid.Resources>
//定义FeatureLayer
<esri:Map x:Name="MyMap" Extent="-130,10,-70,60" >
<esri:Map.Layers>
<esri:FeatureLayer ID="MyFeatureLayer"
Url="http://./ArcGIS/rest/services/Specialty/./MapServer/0"
Where="POP1990 > 75000">
<esri:FeatureLayer.Clusterer>
<esri:FlareClusterer
FlareBackground="#99FF0000"
FlareForeground="White"
MaximumFlareCount="9" />
</esri:FeatureLayer.Clusterer>
<esri:FeatureLayer.OutFields>
<sys:String>CITY_NAME</sys:String>
<sys:String>POP1990</sys:String>
</esri:FeatureLayer.OutFields>
</esri:FeatureLayer>
</esri:Map.Layers>
</esri:Map>
效果如下:

【转】ArcGIS API for Silverlight/WPF 2.1学习笔记(三)的更多相关文章
- ArcGIS API for Silverlight/WPF 2.1学习笔记(一)——精简版
一.安装 1.Visual Studio: (1)Visual Studio 2010或Visual Web Developer Express 2010 (2)Silverlight 4 Tools ...
- 【转】ArcGIS API for Silverlight/WPF 2.1学习笔记(一)
源自:http://blog.163.com/zwx_gis/blog/static/32434435201122193611576/ (主页:http://blog.163.com/zwx_gis/ ...
- 【转】ArcGIS API for Silverlight/WPF 2.1学习笔记(四)
七.Editing ArcGIS Server 10提供了: 通过feature service,在Web上编辑Feature layers的geographic data的功能. 通过geome ...
- 【转】ArcGIS API for Silverlight/WPF 2.1学习笔记(二)
五.Graphics layer 1.新增Graphics layer Graphics layer用于显示用户自定义绘制的点.线.面图形.使用时确保xaml文件中Graphics layer定义 ...
- 【转】ArcGIS API for Silverlight/WPF 2.1学习笔记(五)
2.Find示例代码 (1)xaml文件: //添加Symbol命名空间 xmlns:esriSymbols="clr-namespace:ESRI.ArcGIS.Client.Symbol ...
- 扩展ArcGIS API for Silverlight/WPF 中的TextSymbol支持角度标注
原文 http://blog.csdn.net/esricd/article/details/7587136 在ArcGIS API for Silverlight/WPF中原版的TextSymbol ...
- ArcGIS API for Silverlight学习笔记
ArcGIS API for Silverlight学习笔记(一):为什么要用Silverlight API(转) 你用上3G手机了吗?你可能会说,我就是喜欢用nokia1100,ABCDEFG跟我都 ...
- ArcGIS API for Silverlight开发入门
你用上3G手机了吗?你可能会说,我就是喜欢用nokia1100,ABCDEFG跟我 都没关系.但你不能否认3G是一种趋势,最终我们每个人都会被包裹在3G网络中.1100也不是一成不变,没准哪天为了打击 ...
- ArcGIS API For Silverlight使用在线地图的多种方法总结
引自:http://www.cnblogs.com/meimao5211/p/3283969.html ArcGIS API For Silverlight使用在线地图的多种方法总结 本人也正在学习A ...
随机推荐
- yii2之创建管理员
第一步,使用迁移文件建表admin 先建立数据迁移文件: 小贴士,如果发现自己改错了,需要重新修改迁移文件 第二步,使用gii工具创建model 创建一个新的model,继承AdminAR,方便以后管 ...
- Object-C-Foundation-NSNuber
NSNumber 是一个数值类型封装起来的数值. 装箱:基础类型->对象类型 NSNumber *number=[NSNumber numberWithInt:12]; 拆箱:对象类型-> ...
- 最短路径-----迪杰斯特拉算法(C语言版)
原文:http://blog.csdn.net/mu399/article/details/50903876 转两张思路图非常好: 描述略 图片思路很清晰. Dijkstra不适用负权值,负 ...
- python+Django框架运用(一)
Django 介绍: django是一个采用Python语言开发的开源框架,2005年发布.早期是做新闻以及内容管理的网站的,提供了非常强大的后管理系统. django官网:https://www.d ...
- 主成分分析(PCA)学习笔记
这两天学习了吴恩达老师机器学习中的主成分分析法(Principal Component Analysis, PCA),PCA是一种常用的降维方法.这里对PCA算法做一个小笔记,并利用python完成对 ...
- 每天一个Linux命令(1)ls命令
ls是list的缩写,ls命令是Linux系统下最常用的命令之一. ls命令用于打印当前目录的清单,如果指定其它目录,那么就会显示其他目录的文件及文件夹的清单. 通过ls 命令还可以查看文件其它的详细 ...
- Linux服务器---apache支持SSL
Apache支持ssl 1.检测是否安装ssl模块,如果没有就安装 [root@localhost cgi-bin]# rpm -qa | grep mod_ssl //查看是否安 ...
- Linux服务器---本地yum
本地yum 本地yum可以实现各种包的快速安装,避免漫长的下载过程 1.找一个centos的安装包,将其挂载的系统中 [root@localhost ~]# mount –t iso9660 –loo ...
- C++系统时间及字符串转换参考资料
https://msdn.microsoft.com/en-us/library/a442x3ye.aspx https://msdn.microsoft.com/en-us/library/fe06 ...
- Web负载均衡学习笔记之实现负载均衡的几种实现方式
0x00 概要 负载均衡(Load Balance)是集群技术(Cluster)的一种应用.负载均衡可以将工作任务分摊到多个处理单元,从而提高并发处理能力.目前最常见的负载均衡应用是Web负载均衡.根 ...