flex+ArcGIS修改InfoWindow的样式
infoWindow的显示,及基本设置:
var s:Text = new Text();
s.text = “纽约,人口数量200万。”;//显示的内容
myTextArea.htmlText ="<b>"+s.text+"</b>"; //将显示的字体设为粗体
Map.infoWindow.label = "内容:"; //设置顶部的标签内容
Map.infoWindow.closeButtonVisible = false; //将页面上的关闭按钮隐藏
Map.infoWindow.show(mpEnd);
修改infoWindow的样式,默认是为灰色的背景,显示字体为普通黑色字体,样式改为黄色背景,内容带边框
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
@namespace esri "http://www.esri.com/2008/ags";
@namespace layers "com.esri.ags.layers.*";
@namespace components "com.esri.ags.components.*";
@font-face {
src: url("C:/Windows/Fonts/ARIALBD.TTF");
fontFamily: "ArialEmbedded";
fontWeight: "bold";
}
components|InfoWindow {
content-font-style:bold;
content-background-alpha : 0;
background-color : yellow;
background-alpha : 0.8;
border-style : solid;
}
</fx:Style>