WMS 带样式的图层描述符 (SLD) 示例

以下 SLD 示例可以在公共服务器 sampleserver1.arcgisonline.com 中获得。这些示例旨在帮助您了解 ArcGIS Server 中的 WMS 服务如何使用外部 SLD 资源。

每个示例都有一个相应的 SLD XML 文件,可以通过 URL http://sampleserver1.arcgisonline.com/arcgis/wms/slds/<文件名>.xml 进行访问,以从客户端模拟外部 SLD xml 资源。每个示例还包含一个 WMS GetMap 请求,它可以请求公共 ArcGIS Server WMS 服务(同样在 sampleserver1.arcgisoneline.com 中)来渲染采用外部 SLD 资源中所定义样式的地图。

以下所有 SLD 示例都是专为名为 ESRI_StatesCitiesRivers_USA 的 ArcGIS Server WMS 服务而设计和创建,这些示例均可通过 URL http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer? 进行访问。要使用下面的示例,可以单击 GetMap 请求链接或复制请求字符串并在浏览器中打开。

要查看示例 SLD 文件的内容,请直接通过提供的 URL 访问 XML。此外,还可以免费下载以下任意示例 SLD XML 文件,对它们进行修改,并通过公共 URL 再次传回该文件以便可以请求 ESRI_StatesCitiesRivers_USA WMS 服务来渲染使用您自己的 SLD 样式的地图。

point_pointSymbolizer

point_propertyIsEqualTo

point_propertyIsNotEqualTo

point_propertyIsLike

point_not

point_bbox

point_within

polyline_lineSymbolizer

polygon_polygonSymbolizer

polygon_textSymbolizer

polygon_propertyIsEqualTo

polygon_propertyIsGreaterThan

polygon_propertyIsGreaterThanOrEqualTo

polygon_propertyIsLessThan

polygon_propertyIsLessThanOrEqualTo

polygon_multiple_rules

polygon_and

polygon_or

polygon_contains

polygon_crosses

polygon_disjoint

polygon_intersects

polygon_overlaps

point_pointSymbolizer

描述:点图层中,使用“pointSymbolizer”来渲染要素的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_pointSymbolizer.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1,2&STYLES=,,pointSymbolizer&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_pointSymbolizer.xml

GetMap 响应:

point_propertyIsEqualTo

描述:点图层中,使用“propertyIsEqualTo”过滤器仅渲染所有要素的一个子集的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_propertyIsEqualTo.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1,2&STYLES=,,propertyIsEqualTo&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_propertyIsEqualTo.xml

GetMap 响应:

point_propertyIsNotEqualTo

描述:点图层中,使用“propertyIsNotEqualTo”过滤器仅渲染所有要素的一个子集的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_propertyIsNotEqualTo.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1,2&STYLES=,,propertyIsNotEqualTo&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_propertyIsNotEqualTo.xml

GetMap 响应:

point_propertyIsLike

描述:点图层中,使用“propertyIsLike”过滤器仅渲染所有要素的一个子集的 SLD 样式。例如:仅渲染名称以“San”或“Santa”开头的城市。

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_propertyIsLike.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1,2&STYLES=,,propertyIsLike&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_propertyIsLike.xml

GetMap 响应:

point_not

描述:点图层中,使用“not”逻辑过滤器对另一个过滤器取反并且仅渲染所有要素的一个子集的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_not.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1,2&STYLES=,,not&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_not.xml

GetMap 响应:

point_bbox

描述:边框内,使用“bbox”空间过滤器仅渲染要素的 SLD 样式。

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_bbox.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1,2&STYLES=,,bbox&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_bbox.xml

GetMap 响应:

point_within

描述:面几何内,使用“within”空间过滤器仅渲染要素的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_within.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1,2&STYLES=,,within&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/point_within.xml

GetMap 响应:

polyline_lineSymbolizer

描述:折线图层中,使用“lineSymbolizer”渲染要素的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polyline_lineSymbolizer.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1&STYLES=,lineSymbolizer&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polyline_lineSymbolizer.xml

GetMap 响应:

polygon_polygonSymbolizer

描述:面图层中,使用“polygonSymbolizer”渲染要素的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_polygonSymbolizer.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0&STYLES=polygonSymbolizer&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_polygonSymbolizer.xml

GetMap 响应:

polygon_textSymbolizer

描述:面图层中,使用“textSymbolizer”向每个要素中添加文本的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_textSymbolizer.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0&STYLES=textSymbolizer&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_textSymbolizer.xml

GetMap 响应:

polygon_propertyIsEqualTo

描述:面图层中,使用“propertyIsEqualTo”过滤器仅渲染所有要素的一个子集的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsEqualTo.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0&STYLES=,propertyIsEqualTo&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsEqualTo.xml

GetMap 响应:

polygon_propertyIsGreaterThan

描述:面图层中,使用“propertyIsGreaterThan”过滤器仅渲染所有要素的一个子集的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsGreaterThan.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0&STYLES=,propertyIsGreaterThan&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsGreaterThan.xml

GetMap 响应:

polygon_propertyIsGreaterThanOrEqualTo

描述:面图层中,使用“propertyIsGreaterThanOrEqualTo”过滤器仅渲染所有要素的一个子集的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsGreaterThanOrEqualTo.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0&STYLES=,propertyIsGreaterThanOrEqualTo&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsGreaterThanOrEqualTo.xml

GetMap 响应:

polygon_propertyIsLessThan

描述:面图层中,使用“propertyIsLessThan”过滤器仅渲染所有要素的一个子集的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsLessThan.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0&STYLES=,propertyIsLessThan&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsLessThan.xml

GetMap 响应:

polygon_propertyIsLessThanOrEqualTo

描述:面图层中,使用“propertyIsLessThanOrEqualTo”过滤器仅渲染所有要素的一个子集的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsLessThanOrEqualTo.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0&STYLES=,propertyIsLessThanOrEqualTo&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_propertyIsLessThanOrEqualTo.xml

GetMap 响应:

polygon_multiple_rules

描述:面图层中,使用多种规则应用于要素子集的不同符号系统的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_multiple_rules.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0&STYLES=multiple_rules&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_multiple_rules.xml

GetMap 响应:

polygon_and

描述:面图层中,使用一个“and”逻辑过滤器对其他两个过滤器进行组合来渲染要素子集的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_and.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0,1&STYLES=,and,&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_and.xml

GetMap 响应:

polygon_or

描述:面图层中,使用“or”逻辑过滤器与另一个过滤器进行组合来渲染要素子集的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_or.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0,1&STYLES=,or,&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_or.xml

GetMap 响应:

polygon_contains

描述:使用“contains”空间过滤器仅渲染包含特定点的面要素的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_contains.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0,1,2&STYLES=,contains,,sf&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_contains.xml

GetMap 响应:

polygon_crosses

描述:使用“crosses”空间过滤器仅渲染与另一个要素交叉的面要素的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_crosses.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0,1&STYLES=,crosses,northPlatte&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_crosses.xml

GetMap 响应:

polygon_disjoint

描述:使用“disjoint”空间过滤器仅渲染与另一个要素不相交的面要素的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_disjoint.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0,1&STYLES=,disjoint,northPlatte&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_disjoint.xml

GetMap 响应:

polygon_intersects

描述:使用“intersects”空间过滤器仅渲染与另一个要素相交的面要素的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_intersects.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0,1&STYLES=,intersects,redRiver&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_intersects.xml

GetMap 响应:

polygon_overlaps

描述:使用“overlaps”空间过滤器仅渲染与另一个要素重叠的面要素的 SLD 样式

SLD 文件的 URL: http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_overlaps.xml

GetMap 请求: http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,0&STYLES=,overlaps&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SLD=http://sampleserver1.arcgisonline.com/arcgis/wms/slds/polygon_overlaps.xml

GetMap 响应:


7/10/2012