亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? labelclass.java~77~

?? CreateMyFirstMap
?? JAVA~77~
字號:
package myfirstmap;
import com.mapinfo.mapj.MapJ;
import com.mapinfo.unit.LinearUnit;
import com.mapinfo.util.DoublePoint;
import com.mapinfo.util.DoubleRect;
import com.mapinfo.mapj.Layers;
import com.mapinfo.mapj.DataLayer;
import com.mapinfo.mapj.FeatureLayer;
import com.mapinfo.mapdefcontainer.MapDefContainer;
import  com.mapinfo.mapdefcontainer.FileMapDefContainer;
import com.mapinfo.mapxtreme.client.MapXtremeImageRenderer;
import com.mapinfo.xmlprot.mxtj.ImageRequestComposer;
import java.awt.Color;
import com.mapinfo.mapj.LabelProperties;
import com.mapinfo.graphics.Rendition;
import com.mapinfo.graphics.RenditionImpl;
import com.mapinfo.labeltheme.OverrideLabelTheme;
import com.mapinfo.mapj.BaseLabelProperties;
import com.mapinfo.unit.Distance;
public class LabelClass
{
  private String mdfFilePath="e:\\MapInfo\\study\\mapmdf";
  private  String mdfFileName="states.mdf";
  private String mapxtremeURL="http://901-32:8083/mapxtreme47/mapxtreme";
  private MapDefContainer mapDefContainer;
  public LabelClass()
  {
  }
public void studyLabelProperty()
{
  MapJ mapj=new MapJ();
  DoublePoint centerPoint=new DoublePoint(-108.8,42.5);
  LinearUnit unit=LinearUnit.kilometer ;
  mapj.setDistanceUnits(unit) ;
  mapj.setDeviceBounds(new DoubleRect(0,0,800,600)) ;
  Layers layers=null;
  DataLayer dataLayer=null;
  DoubleRect rect;
  FeatureLayer featureLayer=null;
  String layerName;
  LabelProperties labelProperties;
  //DoubleRect bound=new DoubleRect(centerPoint,
  try
  {
    mapj.setCenter(centerPoint);
//    mapDefContainer=new FileMapDefContainer(mdfFilePath);
//    mapj.loadMapDefinition(mapDefContainer,mdfFileName);
    mapj.loadMapDefinition(mdfFilePath+"\\"+mdfFileName) ;
    layers=mapj.getLayers() ;
    dataLayer=(DataLayer)layers.get(0) ;
    rect=dataLayer.getBounds() ;
    double width=(rect.xmax -rect.xmin )/8;
    double height=(rect.ymax -rect.ymin )/8;
    mapj.setBounds(new DoubleRect(centerPoint,width,height)) ;
    //
  featureLayer=(FeatureLayer)mapj.getLayers() .get(0) ;
    layerName=featureLayer.getName() ;
    labelProperties=new LabelProperties();
    //set the label offset and alignments to their default position
    labelProperties.setOffset(new DoublePoint(1d,1d) ) ;//不用(0,0)可以讓標簽在區域里面,當然最好的辦法是
    //求出每個區域的中心,然后用它作為偏移值,不過再做此之前還應該多一道判斷手續,那就是該幾何體是不是區域
    labelProperties.setHorizontalAlignment(LabelProperties.HORIZ_ALIGN_DEFAULT ) ;
    labelProperties.setVerticalAlignment(LabelProperties.VERT_ALIGN_DEFAULT ) ;
    // Turn the multiline option on and set the columns to be used for labeling.
    labelProperties.setMultiLineTextMode(LabelProperties.MULTILINE_TEXT_ON ) ;
    //labelProperties.setLabelExpression("\"NAME:[\"+State_Name+\"]\\nABBREV:[\"+State+\"]\"");//("\"name:[\"+State_Name+\"]\nabbrev:[\"+State+\"]") ;
    labelProperties.setLabelExpression("\"name:[\"+State+\"]") ;
    //// Set LabelFollowingPath to true to enable label splining
    boolean bFollowPath=true;
//    labelProperties.setLabelFollowingPath(bFollowPath);//我不知道這條語句有什么用
    boolean bfollow=labelProperties.isLabelFollowingPath() ;
    // Set a Rendition for the Labels and create an OverrideLabelTheme in
   // order to display the options set.
    Rendition rend=new RenditionImpl();
    rend.setValue(Rendition.FONT_FAMILY ,"Arial");
    rend.setValue(Rendition.FONT_WEIGHT ,2);
    //Distance distance=new Distance(60,    LinearUnit.kilometer );
    rend.setValue(Rendition.FONT_SIZE ,12);
    rend.setValue(Rendition.FONT_STYLE ,Rendition.FontStyle.ITALIC  );
    rend.setValue(Rendition.SYMBOL_FOREGROUND ,Color.red );
    labelProperties.setRendition(rend) ;
//    OverrideLabelTheme overLabelTheme =new OverrideLabelTheme(labelProperties,"Theme Name");//1
//    featureLayer.getLabelThemeList() .add(overLabelTheme) ;//2
   // Get the States Layer, set its LabelProperties object, and turn labeling on.
   //我覺得這下面的兩條語句沒有必要要,因為labelProperties已經添加到LabelThemeList中去了,我試驗了一下
  //用它們其中一個就可以了,即要么將labelProperties添加到LabelThemeList中去(用1,2),要么用featureLayer來直接設置
  //該標簽屬性(用3,4)
    BaseLabelProperties baseLabel=new BaseLabelProperties(labelProperties);//3
    Distance maxDist=new Distance(100,LinearUnit.kilometer );
    Distance minDist=new Distance(70,LinearUnit.kilometer );
    baseLabel.setZoomMax(maxDist) ;
    baseLabel.setZoomMin(minDist) ;
   featureLayer.setLabelProperties(baseLabel) ;//4
    //下面的語句是另外一種標簽設置方式,它首先通過getLabelProperties()方法得到該層的標簽屬性的引用(不是拷貝)
    //這樣后面的設置就直接反映到標簽屬性里去了,沒有必要再用 featureLayer.setLabelProperties(baseLabel) 這樣的語句了
/*    LabelProperties labelProperties2=featureLayer.getLabelProperties() ;
    Rendition rend2=new RenditionImpl();
    rend2.setValue(Rendition.FONT_STYLE ,Rendition.FontStyle.NORMAL  );
    rend2.setValue(Rendition.FONT_FAMILY ,"Arial");
    rend2.setValue(Rendition.FONT_WEIGHT ,1);
    rend2.setValue(Rendition.FONT_SIZE ,30);
    labelProperties2.setRendition(rend2) ;*/
    //
    featureLayer.setAutoLabel(true) ;//這條語句必須要
    //
    MapXtremeImageRenderer render=new MapXtremeImageRenderer(mapxtremeURL);
    ImageRequestComposer imageRC=ImageRequestComposer.create(mapj,256,Color.white,"image/png");
    render.render(imageRC) ;
    render.toFile("E:\\MapInfo\\study\\png\\labelProperty2.png") ;
    render.dispose() ;
  }catch(Exception e)
  {
    System.out.println("get a "+e.getClass() +"\nwith message "+e.getMessage() ) ;
  }

}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线免费观看日本欧美| 91视频在线看| 亚洲精品一二三| 欧美在线观看视频一区二区三区 | 欧美日韩在线不卡| 国产永久精品大片wwwapp | 国产精品你懂的| 亚洲少妇30p| 亚洲一级二级在线| eeuss国产一区二区三区| 国产三级久久久| 欧美喷水一区二区| 亚洲欧美日韩久久精品| 美腿丝袜一区二区三区| 亚洲图片欧美视频| 久久久久久久久久电影| 亚洲综合久久久久| 欧美性videosxxxxx| 亚洲欧美日韩在线| 亚洲精品成a人| 老司机精品视频导航| 精品久久99ma| av在线免费不卡| 亚洲国产视频在线| 欧美一级xxx| 成人动漫视频在线| 亚洲国产一区视频| 精品国产乱子伦一区| 国产麻豆视频一区| 一区二区三区四区激情 | 最新高清无码专区| 在线视频一区二区免费| 国产精品白丝av| 国产精品久久久久天堂| 麻豆精品久久精品色综合| 国产亚洲欧洲一区高清在线观看| 一本到三区不卡视频| 91久久精品一区二区二区| 日韩欧美中文字幕精品| 盗摄精品av一区二区三区| 日韩国产一二三区| 蜜乳av一区二区三区| 亚洲天堂av老司机| 日韩精品一区二区三区视频| 国产成人精品免费网站| 国产自产v一区二区三区c| 欧美成人综合网站| 日韩一区中文字幕| 91麻豆免费视频| 国产一区二区三区电影在线观看| 一区二区高清在线| 国产精品高潮呻吟| 日韩美女在线视频| 樱花草国产18久久久久| 99久久国产综合色|国产精品| 91猫先生在线| 日本道精品一区二区三区| 91精品福利视频| 91精品在线麻豆| 精品对白一区国产伦| 国产日产精品一区| 综合精品久久久| 亚洲一区二区三区视频在线| 日韩1区2区3区| 国产在线精品不卡| 91免费版在线| 欧美妇女性影城| 亚洲精品在线一区二区| 国产精品久久免费看| 亚洲一区二区三区小说| 久久国产精品99精品国产| 国产成人在线色| 欧美午夜不卡视频| 精品国产自在久精品国产| 国产精品另类一区| 亚洲成人免费看| 国产福利一区二区三区视频在线 | 日本美女一区二区三区视频| 国产一区三区三区| 色综合中文字幕| 精品美女一区二区| 亚洲特级片在线| 麻豆高清免费国产一区| av成人免费在线观看| 在线播放亚洲一区| 国产精品免费av| 日日噜噜夜夜狠狠视频欧美人| 国产精品99久久久久久有的能看| 亚洲国产综合在线| 亚洲欧美怡红院| 麻豆精品一区二区三区| 91黄色在线观看| 国产午夜精品一区二区三区嫩草 | 国产成人精品影视| 美女一区二区三区在线观看| av在线播放不卡| 欧美xfplay| 亚洲va天堂va国产va久| 国产一区二区三区四区五区美女| 在线精品视频小说1| 2021国产精品久久精品| 亚洲国产裸拍裸体视频在线观看乱了| 国产精品自拍网站| 久久久www成人免费无遮挡大片| 亚洲高清免费观看高清完整版在线观看| 美国十次了思思久久精品导航| 欧美视频在线观看一区二区| 中文字幕视频一区| 成人小视频免费观看| 欧美va在线播放| 久久国产精品一区二区| 欧美一区二区三区影视| 欧美亚洲免费在线一区| 亚洲欧美在线视频| 91国内精品野花午夜精品| 一区二区三区成人| 91老师国产黑色丝袜在线| 欧美亚洲图片小说| 国产午夜一区二区三区| 韩国v欧美v日本v亚洲v| 国产在线视频精品一区| 亚洲va欧美va人人爽午夜 | 久久99精品国产.久久久久久| 大白屁股一区二区视频| 欧美精品一区二区久久久| 日韩av在线发布| 7799精品视频| 日本不卡一区二区| 欧美区一区二区三区| 亚洲成av人片一区二区三区| 在线观看91视频| 午夜视频在线观看一区| 日韩av一区二| 国产欧美日韩三区| 色婷婷亚洲综合| 毛片av一区二区| 欧美激情资源网| 色婷婷精品久久二区二区蜜臀av| 久久97超碰色| 亚洲欧美日韩国产手机在线| 综合在线观看色| 9久草视频在线视频精品| 中文成人av在线| 亚洲午夜免费电影| 欧美精品在线观看一区二区| 午夜在线成人av| 日韩视频国产视频| 黑人巨大精品欧美一区| 国产亚洲欧美日韩日本| 国产**成人网毛片九色| 国产精品白丝在线| 欧美怡红院视频| 日本成人超碰在线观看| 久久欧美中文字幕| 成人国产视频在线观看| 一区二区三区资源| 91精品国产乱| 国产精品福利一区二区| 一本大道久久a久久精二百| 亚洲国产一区视频| 日韩欧美亚洲另类制服综合在线| 国内精品视频一区二区三区八戒| 国产农村妇女精品| 日本韩国一区二区| 蜜桃视频一区二区三区| 国产精品水嫩水嫩| 欧美视频一区二区三区在线观看 | 91精品久久久久久久久99蜜臂| 欧美经典一区二区三区| 色婷婷综合久久久中文一区二区 | 天天综合天天做天天综合| 日韩欧美中文一区| 成人免费观看av| 五月天激情小说综合| 国产午夜久久久久| 欧美日韩国产小视频| 国产成人自拍网| 亚洲成a人v欧美综合天堂| 久久久综合精品| 欧美日韩一卡二卡三卡| 国产一区二三区好的| 91精品国产全国免费观看| 国产高清亚洲一区| 日日夜夜免费精品| 国产精品理论片| 欧美一级黄色片| 91久久精品午夜一区二区| 激情深爱一区二区| 亚洲无线码一区二区三区| 久久久不卡网国产精品二区| 欧美日韩成人综合天天影院| 成人美女视频在线观看18| 奇米亚洲午夜久久精品| 一区二区视频在线看| 精品欧美一区二区三区精品久久 | 亚洲3atv精品一区二区三区| 国产欧美一区二区精品久导航| 欧美日韩国产不卡| 99久久99久久综合| 国产高清一区日本|