博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
FeatureLayer 的Feature 的symbol使用renderer
阅读量:2393 次
发布时间:2019-05-10

本文共 4428 字,大约阅读时间需要 14 分钟。

定义个DataRenderer

@namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; .InfoExpandButton { disabledSkin: Embed(source="/assets/swf/skins2.swf", symbol="Callout_expandButtonDisabledSkin"); downSkin: Embed(source="/assets/swf/skins2.swf", symbol="Callout_expandButtonDownSkin"); overSkin: Embed(source="/assets/swf/skins2.swf", symbol="Callout_expandButtonOverSkin"); upSkin: Embed(source="/assets/swf/skins2.swf", symbol="Callout_expandButtonUpSkin"); } .InfoCloseButton { disabledSkin: Embed(source="/assets/swf/skins2.swf", symbol="Callout_closeButtonDisabledSkin"); downSkin: Embed(source="/assets/swf/skins2.swf", symbol="Callout_closeButtonDownSkin"); overSkin: Embed(source="/assets/swf/skins2.swf", symbol="Callout_closeButtonOverSkin"); upSkin: Embed(source="/assets/swf/skins2.swf", symbol="Callout_closeButtonUpSkin"); }

使用该renderer

protected function btnShowVideoInfo_clickHandler(event:MouseEvent):void			{				var videoLayerName:String="sde.SDE.MonitorPoint";				//var videoLayerName:String="sde.SDE.RainMonitory";				featureLayer=MapUtil.getFeatureLayerByName(videoLayerName);								//featureLayer增加feature				featureLayer.addEventListener(GraphicEvent.GRAPHIC_ADD,graphicAddedHandler);				featureLayer.visible=true;								/**				 * feature添加处理函数				 */ 				function graphicAddedHandler(event:GraphicEvent):void{/* 					var features:ArrayCollection=featureLayer.graphicProvider as ArrayCollection;					for each(var feature:Graphic in features){						displayFeatureInfoSymbol(feature);					}  */					displayFeatureInfoSymbol(event.graphic);				}				}			private function displayFeatureInfoSymbol(feature:Graphic,data:Object=null):void{				var infoSymbol:InfoSymbol=new InfoSymbol();				infoSymbol.infoRenderer=new ClassFactory(MoniotorPointInfoSymbolRenderer);				feature.symbol=infoSymbol;				feature.alpha=0.8;				//feature.visible=false;			}
   

转载地址:http://zcgab.baihongyu.com/

你可能感兴趣的文章
OpenCL 笔记5 reconstruction application
查看>>
Self-define float4 vector
查看>>
C++ 赋值运算符重载
查看>>
size_t 和 unsigned int, unsigned long
查看>>
OpenCL 学习笔记6 在CPU/GPU平台上的实现
查看>>
并行处理思想与弗林(Flynn)分类
查看>>
整理:深度学习 vs 机器学习 vs 模式识别
查看>>
深度学习 vs. 概率图模型 vs. 逻辑学
查看>>
IDL box plot
查看>>
IDL vector filed plot
查看>>
piecewise constant function 阶跃常函数
查看>>
IDL save postscript file
查看>>
Bibtex如何使authors in the citation 最多显示两个
查看>>
Bibtex 如何cite 不同格式
查看>>
Cmake environmental variables: how to make find_package, find_path and find_library work
查看>>
Cmake space in path windows
查看>>
Differences between Tesla and a GeForce Series GPU
查看>>
Faster Parallel Reductions on Kepler
查看>>
NVIDIA Tesla C2075 vs Tesla K10 theoretical performance
查看>>
Fast floor/ceiling functions C
查看>>