ags infoWindow 应用
来源:互联网 发布:网络爬虫视频 编辑:程序博客网 时间:2024/05/18 03:45
1 首先如何设置 infowindow或infoWindowRenderer的边框背景色:
- <fx:Style> @namespace esri "http://www.esri.com/2008/ags";
- esri|InfoWindowLabel
- {
- color: white;
- font-size: 20;
- }
- esri|InfoWindow
- {
- border-thickness: 0;
- background-color: green;
- font-size: 16;
- upper-left-radius: 15;
- upper-right-radius: 0;
- info-placement: top;
- info-offset-y: 20;
- }
- </fx:Style>
效果如图:
2 点击地图 任意位置 弹出一个信息窗:
- private function onMouseCLK(event:MapMouseEvent):void
- {
- myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));
- //设置里面的文字:
- myTextArea.text="asdfasf";
- }
设置信息泡的组件:
- <esri:Map id="myMap" mapClick="onMouseCLK(event)">
- <esri:infoWindowContent>
- <mx:TextArea id="myTextArea"
- width="250" height="75"/>
- </esri:infoWindowContent>
- </esri:Map>
3 点击任意一个图元,弹出信息窗:
方式一: 最简单,直接在给图层的infoWindowRenderer 属性赋值:
- <esri:GraphicsLayer >
- <esri:infoWindowRenderer>
- <fx:Component>
- <mx:VBox backgroundColor="0xffffff"
- color="0x444444"
- label="Parcel {data.PARCELID}">
- <mx:Label text="Owner: {data.OWNERNME1}"/>
- <mx:Label text="Address: {data.SITEADDRESS}"/>
- <mx:Label text="Land Value: {data.LNDVALUE}"/>
- <mx:Label text="Landuse: {data.USECD}"/>
- </mx:VBox>
- </fx:Component>
- </esri:infoWindowRenderer>
- <esri:GraphicsLayer/>
方式二: 给graphic加 事件,在事件处理函数中弹出信息窗,所以当图元超过500时,效率很差。
<esri:GraphicsLayer id="roadLayer" graphicAdd="fLayer_graphicAddHandler" />
<!--当图层被加入图元时 触发事件-->
protected function fLayer_graphicAddHandler(event:GraphicEvent):void { event.graphic.addEventListener(MouseEvent.MOUSE_CLICK, onMouseClkHandler); }
- pprivate function onMouseClkHandler(event:MouseEvent):void
- var gr:Graphic = Graphic(event.target);
- gr.symbol = mouseOverSymbol;
- myMap.infoWindow.label = gr.attributes.NAME;
- myMap.infoWindow.closeButtonVisible = false;
- myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY));
- }
或者:
gra.infoWindowRenderer=new ClassFactory(weatherInfoWin);
gra.symble=....;
0 0
- ags infoWindow 应用
- AGS Server-Geoprocessing
- 百度地图植入android应用系列教程三实现百度地图上的覆盖物Marker与InfoWindow的使用
- 6、使用infowindow
- Google Map 自定义infowindow
- google map 自定义infowindow
- Sencha map infowindow
- 使用RelativeLayout代替Infowindow
- InfoWindow 使用介绍
- googlemaps自定义infowindow
- ESRI使用infowindow
- AGS Server Java-ADF Web Controls
- AGS-在地图的graphics layers绘图
- AGS-如何改变操作系统的'keepalive’设置
- AGS FLEX 求线/面的中心点
- AGS Server 10.1 切图工具
- ags js api学习之dojo初步
- AGS Server 10.1 切图工具
- 时间选择框
- 设计模式学习--组合模式,c++代码
- 爱生活爱分享-->爱奇艺、优酷、好莱坞、PPTV等免费资源
- VS2010中检测内存泄露
- TDD之驱动程序和占位程序,和类的接口与实现
- ags infoWindow 应用
- oracle可重复执行脚本写法---总结
- 容器字段FieldContainer
- 狄利克雷过程的五种理解
- 随笔
- Frameset导致Cookies和Session丢失的原因及解决办法
- POJ 2777 Count Color(线段树+位运算)
- leetcode Subsets
- 地图显示实例