//Renderthemaptothefile
Renderer.toFile("comp.gif");
4IndividualvalueTheme
示例:
//getareferencetothelayerwewillbeapplyingthemeto
lyr=lyrs.add(dpr,ttdh,"Territories");
//createanewthemeobject
IndividualvalueThemeiValThm=newIndividualvalueTheme("CoverageTerritory","Sales
CoverageBreakdown");
//createarendition
Renditionrend=RenditionImpl.getDefaultRendition();
//assigncolortorenditionaddattributetothemewithpreviouslysetrendition
rend.setvalue(Rendition.FILL,Color.red);
iValThm.add(newAttribute("SouthWest"),rend);
//assigncolortorenditionaddattributetothemewithpreviouslysetrendition
rend.setvalue(Rendition.FILL,Color.blue);
iValThm.add(newAttribute("SouthEast"),rend);
//assigncolortorenditionaddattributetothemewithpreviouslysetrendition
rend.setvalue(Rendition.FILL,Color.green);
iValThm.add(newAttribute("Central"),rend);
//Addthethemetolayersthemelist
lyr.getThemeList().add(iValThm);
//Storecolumnnameandtypeinhashtable
Hashtableht=newHashtable();
ht.put("geomtype",IndividualvalueThemeLegend.REGION_GEOMETRY);
ht.put("lableorder",IndividualvalueThemeLegend.ORDER_ASCENDING);
//Createnewlegendpassingthemeandhashtable.ThesetThemeTitle.
IndividualvalueThemeLegendiValThmLeg;
iValThmLeg=newIndividualvalueThemeLegend(iValThm,ht);
iValThmLeg.setTitle("CovergeTerritorylegend");
//Generategifimagefromlegend
iValThmLeg.toFile("c:\\temp\\terrLeg.gif","image/gif");
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/tongxinshuyu/article-27888-10.html
大发
任何东西都要一分为二看问题
美军基地早就撤走了好吗
说实话哦