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

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

?? createmap.java~132~

?? CreateMyFirstMap
?? JAVA~132~
?? 第 1 頁 / 共 2 頁
字號:
package myfirstmap;
import com.mapinfo.mapj.MapJ;
import com.mapinfo.mapdefcontainer.MapDefContainer;
import com.mapinfo.mapdefcontainer.FileMapDefContainer;
import com.mapinfo.util.DoubleRect;
import com.mapinfo.util.DoublePoint;
import com.mapinfo.mapxtreme.client.MapXtremeImageRenderer;
import com.mapinfo.xmlprot.mxtj.ImageRequestComposer;
import java.awt.Color;
import java.awt.Event;
import com.mapinfo.mapdefcontainer.OraSoMapDefContainer;
import com.mapinfo.dp.tab.TABTableDescHelper;
import java.io.File;
import com.mapinfo.dp.tab.TABDataProviderHelper;
import com.mapinfo.mapxtreme.client.MapXtremeDataProviderRef;
import com.mapinfo.dp.jdbc.oraso.OraSoDataProviderHelper;
import com.mapinfo.dp.jdbc.DriverType;
import com.mapinfo.dp.jdbc.oraso.OraSoTableDescHelper;
import com.mapinfo.dp.RenditionType;
import com.mapinfo.coordsys.CoordSys;
import com.mapinfo.mapj.Layers;
import com.mapinfo.mapj.DataLayer;
import com.mapinfo.mapj.AbstractLayer;
import com.mapinfo.unit.LinearUnit;
import com.mapinfo.unit.Distance;
import com.mapinfo.mapj.FeatureLayer;
import com.mapinfo.mapj.LabelProperties;
import com.mapinfo.mapj.Layer;
public class CreateMap
{
  private MapJ myMap;
  private MapDefContainer mdc;
  public CreateMap()
  {
  }
public void  CreateOneMap(String gstName,String saveFileName)
  {//map source comes from .gst file
    myMap=new MapJ();
    try
    {
      //loading one geoset
     // myMap.loadGeoset("E:\\MapInfo\\study\\mapgst\\"+gstName,
                   //    "E:\\MapInfo\\study\\mapgst",null);
      /*myMap.loadGeoset("E:\\MapInfo\\study\\mapgst\\world.gst",
                       "E:\\MapInfo\\study\\mapgst",
                       "http://901-32:8083/mapxtreme47/mapxtreme");*/
      //load a map difinition
      //to load a map definition ,we must create a MapDefContainer which is abstraction that represents
      //where the map difinition is stored
     // mdc=new FileMapDefContainer("E:\\MapInfo\\study\\mapmdf");
      //load the name map definition
     // myMap.loadMapDefinition(mdc,"world.mdf");
      //set the device bounds
      myMap.setDeviceBounds(new DoubleRect(0,0,800,600)) ;
      //to render the map,we must instantiate a render object
      //the following statement use a MapXtremeImageRenderer and render the image as gif
      String mapxtremeServletUrl="http://901-32:8083/mapxtreme47/mapxtreme";
      MapXtremeImageRenderer render=new MapXtremeImageRenderer(mapxtremeServletUrl);
      //create an ImageRequestComposer
      myMap.setZoom(10) ;
     //add one layer
     // specify the url to the MapXtreme servlet which remotely connects us  to the map engine
     String mapXtremeURL = "http://901-32:8083/mapxtreme47/mapxtreme";
     // create the tab TableDescHelper
     TABTableDescHelper tabTDHelper = new TABTableDescHelper( new File("e:\\MapInfo\\studymap\\line.tab").getName());
// create the tab DataProviderHelper
     TABDataProviderHelper tabDPHelper = new TABDataProviderHelper("e:\\MapInfo\\studymap");
     // Create the Remote DataProviderRef needed to access the Data
     MapXtremeDataProviderRef mxtDPRef = new MapXtremeDataProviderRef(tabDPHelper, mapXtremeURL);
// assign it to MapJ
     myMap.getLayers().addLayer(mxtDPRef, tabTDHelper, "tabLayer");
     //
      ImageRequestComposer imageRC=ImageRequestComposer.create(myMap,256,Color.BLUE ,"image/png");

      //render the map
      render.render(imageRC) ;
      //export the rendered map to file
      render.toFile("e:\\mapinfo\\study\\mapimage\\"+saveFileName) ;
    }catch(java.io.IOException  ioe)
    {
      System.out.println("get a "+ioe.getClass() +"\nwith message "+ioe.getMessage() ) ;
    }catch(java.lang.Exception  e)
    {
      System.out.println("get a "+e.getClass() +"\nwith message "+e.getMessage() ) ;
      e.printStackTrace() ;
    }
  }
  public void  CreateOneMap2()
    {//map source comes from map definition file
      myMap=new MapJ();
      try
      {
        //loading one geoset
        /*myMap.loadGeoset("E:\\MapInfo\\study\\mapgst\\Administrative.gst",
                         "E:\\MapInfo\\study\\mapgst",null);*/
        /*myMap.loadGeoset("E:\\MapInfo\\study\\mapgst\\world.gst",
                         "E:\\MapInfo\\study\\mapgst",
                         "http://901-32:8083/mapxtreme47/mapxtreme");*/
        //load a map difinition
        //to load a map definition ,we must create a MapDefContainer which is abstraction that represents
        //where the map difinition is stored
        mdc=new FileMapDefContainer("E:\\MapInfo\\study\\mapmdf");
        //load the name map definition
        myMap.loadMapDefinition(mdc,"ADMINISTRATIVE3.mdf");
        //set the device bounds
        myMap.setDeviceBounds(new DoubleRect(0,0,800,600)) ;
        Layer layer=(Layer)myMap.getLayers() .get(0) ;
        //to render the map,we must instantiate a render object
        //the following statement use a MapXtremeImageRenderer and render the image as gif
        String mapxtremeServletUrl="http://901-32:8083/mapxtreme47/mapxtreme";
        MapXtremeImageRenderer render=new MapXtremeImageRenderer(mapxtremeServletUrl);
        //create an ImageRequestComposer
        LinearUnit distUnit = LinearUnit.kilometer;
       //LinearUnit distUnit=LinearUnit.meter ;
       myMap.setDistanceUnits(distUnit);
        myMap.setZoom(42.35) ;//設置不是比例尺,設置的是視野范圍,即窗口寬度。

       // DoubleRect bounds = new DoubleRect(new DoublePoint(108.9607,34.2729),0.31,0.21);
        //設置該地圖的中心為(108.9607,34.2729)單位為經緯度單位,0.31表示該地圖的經度的最大值與最小值之差為0.31
        //0.21表示該地圖的緯度的最大值與最小值之差為0.21
       // myMap.setBounds(bounds);
        ImageRequestComposer imageRC=ImageRequestComposer.create(myMap,256,Color.BLUE ,"image/png");
        //render the map
        render.render(imageRC) ;
        //export the rendered map to file
        render.toFile("e:\\mapinfo\\study\\mapimage\\administrative_24.png") ;
      }catch(java.io.IOException  ioe)
      {
        System.out.println("get a "+ioe.getClass() +"\nwith message "+ioe.getMessage() ) ;
      }catch(java.lang.Exception  e)
      {
        System.out.println("get a "+e.getClass() +"\nwith message "+e.getMessage() ) ;
        e.printStackTrace() ;
      }

    }
public void saveToMapDef()
{
  String drivername="oracle.jdbc.driver.OracleDriver";
  String dburl="jdbc:oracle:thin:@901-32:1521:xianmap";
  String username="userstoremap2";
  String password="Icando41";
  String tablename="mapdefinition";
  String nameCol="name";
  String mapDefCol="mapdef";
  try
  {
    OraSoMapDefContainer mdc = new OraSoMapDefContainer(drivername, dburl,
        username, password,tablename,nameCol,mapDefCol);
    //最后三個參數解釋一下,tablename表示將world.gst所對應的數據保存到哪個表中
    //nameCol表示存儲表名的字段名稱是什么,mapDefCol表示存儲地圖數據的字段名稱又是什么
    MapJ map=new MapJ();
    map.loadGeoset("E:\\MapInfo\\study\\mapgst\\world.gst",
                       "E:\\MapInfo\\study\\mapgst",null);
    map.saveMapDefinition(mdc,"world");//"world" indicate the value in field "name",don't mean file world.gst
  }catch(java.sql.SQLException  sqle)
  {
    System.out.println("get a "+sqle.getClass() +"\nwith message "+sqle.getMessage() ) ;
    sqle.printStackTrace() ;
  }catch(java.io.IOException ioe)
  {
    System.out.println("get a "+ioe.getClass() +"\nwith message "+ioe.getMessage() ) ;
    ioe.printStackTrace() ;
  }catch(java.lang.Exception  e)
  {
    System.out.println("get a "+e.getClass() +"\nwith message "+e.getMessage() ) ;
    e.printStackTrace() ;
  }
}
public void loadDataFromOracle(String imageName)
{
  //specify the url to mapxtremeservelt that will be used to access the data
  String strUrl="http://901-32:8083/mapxtreme47/mapxtreme";
  //use database specify DataProviderHelper
    OraSoDataProviderHelper oraDPHelper = new OraSoDataProviderHelper(
        "901-32", 1521, "xianmap",
        "userstoremap2", "Icando41", DriverType.thin,
        "oracle.jdbc.driver.OracleDriver");
  //create a string array with the name(s) of the column(s)  to use as unique key for the records in the table
String[] idColumns={"MI_PRINX"};
  //create a tableDescHelper
  //required constructuor when use a tablename
 OraSoTableDescHelper oraDTHelper=new OraSoTableDescHelper("ADMINISTRATIVE3",false,idColumns,
     "GEOLOC",null,RenditionType.none,null,RenditionType.none, CoordSys.longLatWGS84 ,2,"USERSTOREMAP2");
//reference the remote data provider need to access the data
 try
 {
   MapXtremeDataProviderRef mxtDPRef = new MapXtremeDataProviderRef(
       oraDPHelper, strUrl);
  MapJ map=new MapJ();
  map.setDeviceBounds(new DoubleRect(0,0,800,600)) ;
  map.getLayers() .insertLayer(mxtDPRef,oraDTHelper,0,"onelayer");
  MapXtremeImageRenderer render=new MapXtremeImageRenderer(strUrl);
  ImageRequestComposer imageRC=ImageRequestComposer.create(map,256,Color.cyan ,"image/png");
  render.render(imageRC) ;
  render.toFile("e:\\mapinfo\\study\\mapimage\\"+imageName) ;

 }catch(java.lang.Exception  e)
 {
   System.out.println("get a "+e.getClass() +"\nwith message "+e.getMessage() ) ;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产午夜精品一区二区三区视频| av激情成人网| 日韩不卡一区二区| 欧美日本一区二区三区四区| 麻豆免费精品视频| 久久99热这里只有精品| 国产馆精品极品| 色噜噜狠狠色综合中国| 91麻豆蜜桃一区二区三区| 91福利精品视频| 欧美伦理视频网站| 日韩小视频在线观看专区| 亚洲狠狠爱一区二区三区| 亚洲成av人片在线| 亚洲国产精品久久人人爱| 精品一区二区三区在线播放视频| 日韩**一区毛片| 国产大片一区二区| 欧美手机在线视频| 欧美激情资源网| 精品成人一区二区| 亚洲色大成网站www久久九九| 五月婷婷久久丁香| 国产精品一区二区你懂的| 在线观看视频一区二区 | heyzo一本久久综合| 成人精品视频一区| 欧美综合久久久| 人禽交欧美网站| 亚洲一区二区三区四区不卡| 精彩视频一区二区三区| 91视频免费播放| 国产乱码精品一区二区三| 95精品视频在线| 欧美一区二区三区在| 日一区二区三区| 麻豆91精品视频| 3751色影院一区二区三区| 中文字幕在线不卡| 99久精品国产| 一区二区三区中文字幕电影| 欧美在线看片a免费观看| 亚洲第一福利一区| 日韩一级二级三级精品视频| 蜜臀久久久久久久| 久久伊人蜜桃av一区二区| 国产很黄免费观看久久| 中文字幕免费一区| 一本久久a久久精品亚洲| 一二三区精品视频| 欧美一区二区久久久| 久久99国产精品麻豆| 欧美韩日一区二区三区四区| 91麻豆福利精品推荐| 午夜激情久久久| 26uuu国产在线精品一区二区| 成人午夜视频网站| 亚洲成人免费在线观看| 欧美va亚洲va| 99久久国产免费看| 爽好多水快深点欧美视频| 欧美成人a视频| 99国产精品久久久| 青青草国产成人av片免费| 亚洲国产精品高清| 欧美一区二区观看视频| 精品国产91九色蝌蚪| av电影在线不卡| 视频一区欧美精品| 国产精品久久久久久户外露出 | 丝袜美腿亚洲色图| 日本一区二区三区免费乱视频| 色八戒一区二区三区| 麻豆免费看一区二区三区| 亚洲美女免费在线| 久久毛片高清国产| 欧美亚日韩国产aⅴ精品中极品| 久久精品国产精品青草| 亚洲素人一区二区| 日韩欧美国产1| 色综合天天天天做夜夜夜夜做| 蜜桃av一区二区在线观看| 亚洲免费观看高清完整版在线观看熊| 91麻豆精品国产综合久久久久久| 国产很黄免费观看久久| 日韩黄色一级片| 一区二区三区免费网站| 久久午夜老司机| 欧美一级xxx| 在线观看日韩高清av| 丁香一区二区三区| 黄色成人免费在线| 日欧美一区二区| 最新日韩av在线| 国产女同性恋一区二区| 精品久久国产97色综合| 欧美日韩精品高清| 日本韩国视频一区二区| www..com久久爱| 国产成人精品一区二| 日韩精品一级中文字幕精品视频免费观看 | 国产美女久久久久| 在线影院国内精品| 91免费在线视频观看| www.亚洲精品| 成人h精品动漫一区二区三区| 蜜桃av一区二区三区| 日韩精品成人一区二区在线| 一区二区在线观看不卡| 亚洲欧美在线高清| 亚洲人亚洲人成电影网站色| 中文天堂在线一区| 国产精品毛片大码女人| 亚洲国产成人一区二区三区| 国产欧美一区二区精品仙草咪| 欧美成人video| 精品国精品国产| 久久亚洲精品国产精品紫薇| 久久久三级国产网站| 国产欧美久久久精品影院 | 色综合天天综合网天天看片| 99视频在线精品| 国产精品综合视频| 成人福利视频在线| 在线精品视频一区二区| 在线观看一区二区视频| 欧美日韩在线三区| 这里是久久伊人| 久久综合色婷婷| 中文字幕在线不卡一区| 亚洲狠狠丁香婷婷综合久久久| 国产精品久久国产精麻豆99网站| 亚洲日本在线观看| 亚洲综合视频在线观看| 亚洲精品免费在线观看| 国产精品毛片高清在线完整版| 国产精品狼人久久影院观看方式| 亚洲欧美另类久久久精品2019| 亚洲电影激情视频网站| 久久国产尿小便嘘嘘尿| 成人精品一区二区三区中文字幕| 成人激情动漫在线观看| 欧美日韩情趣电影| 久久天天做天天爱综合色| 亚洲视频一二三| 看电视剧不卡顿的网站| 欧美国产欧美综合| 亚洲国产cao| 国产精品影视在线观看| 91久久精品网| 精品国产不卡一区二区三区| 国产欧美日韩在线观看| 五月婷婷综合激情| 99久久99久久久精品齐齐| 91精品国产综合久久婷婷香蕉| 国产视频一区不卡| 一区二区三区在线视频观看58| 久久99久久精品| 91麻豆产精品久久久久久| 欧美一区二区三区四区视频| 亚洲欧洲日本在线| 精品影院一区二区久久久| 在线看国产一区二区| www一区二区| 亚洲6080在线| 亚洲同性同志一二三专区| 麻豆91在线观看| 在线免费观看视频一区| 精品福利一区二区三区免费视频| 亚洲欧美日韩成人高清在线一区| 激情综合一区二区三区| 欧美亚洲动漫另类| 中文字幕亚洲不卡| 国产乱一区二区| 欧美一区二区久久久| 亚洲另类色综合网站| 成人国产精品免费网站| 精品99久久久久久| 蜜臀精品一区二区三区在线观看| 色噜噜久久综合| 亚洲男人的天堂在线观看| 国产高清亚洲一区| 2020国产成人综合网| 久久aⅴ国产欧美74aaa| 欧美一区二区三区思思人| 亚洲mv大片欧洲mv大片精品| 色琪琪一区二区三区亚洲区| 综合激情网...| 99r国产精品| 国产精品电影一区二区| 成人激情小说网站| 欧美激情一区不卡| 波多野结衣精品在线| 国产亚洲成年网址在线观看| 国产一区二区剧情av在线| 不卡一区二区在线| 欧美xxxx在线观看| 免费人成精品欧美精品| 欧美一区二区在线看| 免费成人你懂的|