前段时间上网很不方便,自己的博客很久没有更新。知识积累和总结是进步的必要条件,所以今后依旧要不断学习,及时更新博客。
我和GeoServer的地图图层样式配置打交道也很久了,时不时就要参照google map配置一下图层样式。今晚又被分配了添加地图样式的任务。自己在网上找到很多很好的地图配置样式的资源,现在汇总一下与大家分享。
原则: 1 地图每放大一层,各个道路的线条粗细、颜色都要变化 2 地图底色为灰白色 3 河流蓝色,公园绿色 , 小区为斜线图,颜色始终不变 4 省级行政中心、市级、* , 都用五角星标注,根据不同级别设置大小 SLD如下: http://code.google.com/p/wxf-coder-classroom/source/browse/#svn/trunk/SLD 转:http://hi.baidu.com/w2y0xy0sf5z/blog/item/670baa091c327ec33bc76335.html |
二、铁路和公路样式
黑白相间的铁路样式 下载
- < sld:StyledLayerDescriptor xmlns:sld ="http://www.opengis.net/sld" xmlns:ogc ="http://www.opengis.net/ogc" xmlns:gml ="http://www.opengis.net/gml" version ="1.0.0" >
- < sld:UserLayer >
- < sld:LayerFeatureConstraints >
< sld:FeatureTypeConstraint />
</ sld:LayerFeatureConstraints >
- < sld:UserStyle >
< sld:Name > Default Styler </ sld:Name >
< sld:Title > Default Styler </ sld:Title >
< sld:Abstract />
- < sld:FeatureTypeStyle >
< sld:Name > name </ sld:Name >
< sld:Title > title </ sld:Title >
< sld:Abstract > abstract </ sld:Abstract >
< sld:FeatureTypeName > Feature </ sld:FeatureTypeName >
< sld:SemanticTypeIdentifier > generic:geometry </ sld:SemanticTypeIdentifier >
- < sld:Rule >
< sld:Name > name </ sld:Name >
< sld:Title > title </ sld:Title >
< sld:Abstract > Abstract </ sld:Abstract >
- < sld:LineSymbolizer >
- < sld:Stroke >
- < sld:CssParameter name ="stroke" >
< ogc:Literal > #666666 </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="stroke-linecap" >
< ogc:Literal > butt </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="stroke-linejoin" >
< ogc:Literal > miter </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="stroke-opacity" >
< ogc:Literal > 1 </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="stroke-width" >
< ogc:Literal > 5 </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="stroke-dashoffset" >
< ogc:Literal > 0 </ ogc:Literal >
</ sld:CssParameter >
</ sld:Stroke >
</ sld:LineSymbolizer >
</ sld:Rule >
</ sld:FeatureTypeStyle >
- < sld:FeatureTypeStyle >
< sld:Name > name </ sld:Name >
< sld:Title > title </ sld:Title >
< sld:Abstract > abstract </ sld:Abstract >
< sld:FeatureTypeName > Feature </ sld:FeatureTypeName >
< sld:SemanticTypeIdentifier > generic:geometry </ sld:SemanticTypeIdentifier >
- < sld:Rule >
< sld:Name > name </ sld:Name >
< sld:Title > title </ sld:Title >
< sld:Abstract > Abstract </ sld:Abstract >
- < sld:LineSymbolizer >
- < sld:Stroke >
- < sld:CssParameter name ="stroke" >
< ogc:Literal > #FFFFFF </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="stroke-linecap" >
< ogc:Literal > butt </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="stroke-linejoin" >
< ogc:Literal > miter </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="stroke-opacity" >
< ogc:Literal > 1 </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="stroke-width" >
< ogc:Literal > 3 </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="stroke-dashoffset" >
< ogc:Literal > 0 </ ogc:Literal >
</ sld:CssParameter >
</ sld:Stroke >
</ sld:LineSymbolizer >
</ sld:Rule >
</ sld:FeatureTypeStyle >
- < sld:FeatureTypeStyle >
< sld:Name > name </ sld:Name >
< sld:Title > title </ sld:Title >
< sld:Abstract > abstract </ sld:Abstract >
< sld:FeatureTypeName > Feature </ sld:FeatureTypeName >
< sld:SemanticTypeIdentifier > generic:geometry </ sld:SemanticTypeIdentifier >
- < sld:Rule >
< sld:Name > name </ sld:Name >
< sld:Title > title </ sld:Title >
< sld:Abstract > Abstract </ sld:Abstract >
- < sld:LineSymbolizer >
- < sld:Stroke >
- < sld:CssParameter name ="stroke" >
< ogc:Literal > #000000 </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="stroke-linecap" >
< ogc:Literal > butt </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="stroke-linejoin" >
< ogc:Literal > miter </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="stroke-opacity" >
< ogc:Literal > 1 </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="stroke-width" >
< ogc:Literal > 3 </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="stroke-dashoffset" >
< ogc:Literal > 0 </ ogc:Literal >
</ sld:CssParameter >
< sld:CssParameter name ="stroke-dasharray" > 15.0 15.0 </ sld:CssParameter >
</ sld:Stroke >
</ sld:LineSymbolizer >
- < sld:TextSymbolizer >
- < sld:Label >
< ogc:PropertyName > name </ ogc:PropertyName >
</ sld:Label >
- < sld:Font >
- < sld:CssParameter name ="font-family" >
< ogc:Literal > 宋体 </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="font-size" >
< ogc:Literal > 10.5 </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="font-style" >
< ogc:Literal > Normal </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="font-weight" >
< ogc:Literal > normal </ ogc:Literal >
</ sld:CssParameter >
</ sld:Font >
- < sld:LabelPlacement >
- < sld:PointPlacement >
- < sld:AnchorPoint >
- < sld:AnchorPointX >
< ogc:Literal > 0.0 </ ogc:Literal >
</ sld:AnchorPointX >
- < sld:AnchorPointY >
< ogc:Literal > 0.5 </ ogc:Literal >
</ sld:AnchorPointY >
</ sld:AnchorPoint >
- < sld:Displacement >
- < sld:DisplacementX >
< ogc:Literal > 0 </ ogc:Literal >
</ sld:DisplacementX >
- < sld:DisplacementY >
< ogc:Literal > 0 </ ogc:Literal >
</ sld:DisplacementY >
</ sld:Displacement >
- < sld:Rotation >
< ogc:Literal > 0 </ ogc:Literal >
</ sld:Rotation >
</ sld:PointPlacement >
</ sld:LabelPlacement >
- < sld:Halo >
- < sld:Radius >
< ogc:Literal > 2 </ ogc:Literal >
</ sld:Radius >
- < sld:Fill >
- < sld:CssParameter name ="fill" >
< ogc:Literal > #FFFFFF </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="fill-opacity" >
< ogc:Literal > 0.85 </ ogc:Literal >
</ sld:CssParameter >
</ sld:Fill >
</ sld:Halo >
- < sld:Fill >
- < sld:CssParameter name ="fill" >
< ogc:Literal > #000000 </ ogc:Literal >
</ sld:CssParameter >
- < sld:CssParameter name ="fill-opacity" >
< ogc:Literal > 1.0 </ ogc:Literal >
</ sld:CssParameter >
</ sld:Fill >
</ sld:TextSymbolizer >
</ sld:Rule >
</ sld:FeatureTypeStyle >
</ sld:UserStyle >
</ sld:UserLayer >
</ sld:StyledLayerDescriptor >
高速公路样式:下载
转自:http://www.cnblogs.com/feesuo/archive/2009/11/03/1595102.html
参考:http://blog.csdn.net/cyw8998/archive/2009/02/18/3907410.aspx
三、 SLD定义带轮廓的线的道路样式
转:http://www.gisjc.com/a/kaiyuangis/2010/0421/106.html