goldeagle
路人甲
路人甲
  • 注册日期2006-04-06
  • 发帖数7
  • QQ
  • 铜币126枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1731回复:0

[求助]关于GIS新建图层代码的一些不明白的地方

楼主#
更多 发布于:2006-04-07 14:39
<P>String names[] = { "MI_Lable", "MI_recordID"};<BR>   int typ[] = { 7, 7};<BR>   int keys[] = { 1, 2};</P>
<P>      TableInfoImpl tableinfo = new TableInfoImpl("point", myMap<BR>     .getDisplayCoordSys(), names, typ, (names.length), keys,<BR>     false);</P>
<P>     AnnotationTableDescHelper annTDHelper = new AnnotationTableDescHelper("point");<BR>     AnnotationDataProviderHelper annDPHelper = new AnnotationDataProviderHelper();<BR>     LocalDataProviderRef localDPRef = new LocalDataProviderRef(annDPHelper);<BR>   myMap.getLayers().insertLayer(localDPRef, annTDHelper, 0, "point");</P>
<P><FONT color=#ff0000>//AnnotationTableDescHelper、AnnotationDataProviderHelper 和LocalDataProviderRef这三个类在新建图层的时候有什么作用?</FONT></P>
<P><FONT color=#ff0000></FONT> </P>
<P><FONT color=#ff0000>//下面的代码是不是设置层显示的字体和格式?</FONT></P>
<P>      FeatureLayer lyr = (FeatureLayer) myMap.getLayers().get("point");<BR>   lyr.getLabelProperties().setVerticalAlignment(<BR>     LabelProperties.VERT_ALIGN_CENTER);<BR>  </P>
<P>   Rendition rend1 = new RenditionImpl();<BR>   rend1.setValue(Rendition.SYMBOL_MODE, Rendition.SymbolMode.FONT);<BR>   rend1.setValue(Rendition.FONT_FAMILY, "宋体");<BR>   rend1.setValue(Rendition.FONT_WEIGHT, 10);<BR>   rend1.setValue(Rendition.SYMBOL_FOREGROUND, Color.BLUE);<BR>   lyr.getLabelProperties().setRendition(rend1);<BR>   lyr.setAutoLabel(true);<BR>   lyr.getLabelProperties().setLabelColumn(0);<BR> </P><img src="images/post/smile/dvbbs/em02.gif" />
喜欢0 评分0
游客

返回顶部