惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
S
SegmentFault 最新的问题
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
美团技术团队
爱范儿
爱范儿
博客园 - 三生石上(FineUI控件)
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
DataBreaches.Net
F
Fortinet All Blogs
TaoSecurity Blog
TaoSecurity Blog
D
Docker
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
宝玉的分享
宝玉的分享
腾讯CDC
Google Online Security Blog
Google Online Security Blog
Recorded Future
Recorded Future
T
The Exploit Database - CXSecurity.com
T
The Blog of Author Tim Ferriss
V
V2EX
S
Securelist
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
CERT Recently Published Vulnerability Notes
A
Arctic Wolf
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
Y
Y Combinator Blog
P
Proofpoint News Feed
T
Tor Project blog
AWS News Blog
AWS News Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
博客园 - 聂微东
T
Threat Research - Cisco Blogs
B
Blog
Attack and Defense Labs
Attack and Defense Labs
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
阮一峰的网络日志
阮一峰的网络日志
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
N
News and Events Feed by Topic
博客园 - 司徒正美
H
Help Net Security
C
Cisco Blogs
C
Check Point Blog
S
Secure Thoughts

博客园 - 独孤求败

移动端跨平台框架及资料 清理数据库订阅表 Raphael JS 矢量客户端开源框架 基于SqlServer 2008 Service Broker的分布式应用 Telerik在mvc中的环境搭建 openscales2.2 tilecache2.11图片缓存 openscales2.2 的初始缩放等级 openscales2.2的画点、线、多边形 Vs2010 FLex的集成开发 Openscales2.2 mapserver 开发demo PostGis Mapserver Openscales 环境搭建 mvc3无智能提示的解决方法 oracle数据库管理员创建用户的job 隐藏后台执行的dos窗口 iframe 加载完成但是ie进度条还在加载的解决办法 安卓模拟器的安装和使用 WCF错误及处理记录 - 独孤求败 - 博客园 .net学习资料链接收集整理 B树、B-树、B+树、B*树
openscales2.2 style定义
独孤求败 · 2013-04-03 · via 博客园 - 独孤求败

openscales中的WFS加载的地图样式定义(主要的类图参见如下):

定义元素的样式-》定义多个规则-》规则--对应线、点、多边形或者文本的样式。

具体样式示例:

private function SetPointStyle():Style{
            var pointStyle:Style = new Style();
            var pointrule:Rule = new Rule();
            //定义点显示的图符
            var custommark:org.openscales.core.style.marker.CustomMarker = new org.openscales.core.style.marker.CustomMarker();
            custommark.clip = Bitmap( new PointGif());
            var pointSymb:PointSymbolizer = new PointSymbolizer(custommark);
            pointrule.name="point rule";
            pointrule.symbolizers.push(pointSymb);
            pointStyle.name="PointStyle";
            pointStyle.rules.push( pointrule);
            return pointStyle;
        }
        
        private function SetLineStyle():Style{
            var linestyle:Style = new Style();
            var linerule:Rule = new Rule();
            //定义线的样式:
            var linestroke:Stroke = new Stroke(0x7FFF00,2)
            var lineSymb:LineSymbolizer = new LineSymbolizer(linestroke);
            linerule.name="linerule";
            linerule.symbolizers.push(lineSymb);
            linestyle.name="LineStyle";
            linestyle.rules.push( linerule);
            return linestyle;
        }

  以上当中图片(PointGif)的定义为

[Bindable]
		[Embed(source="/assets/images/icons/Point.gif")]
		private var PointGif:Class;

 在WFS中的引用如下:

<os:WFS
            name="pointend_track"
            url="http://localhost:8085/cgi-bin/mapserv.exe?MAP=D:/tmp/GisDemo/GisDemo/Content/map/OpenscalesDemo.map"
            typename ="pointend_track"
            version="1.0.0"
            useCapabilities="false"
            style="{this.SetPointStyle()}"
        />

参见点的效果如图: