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

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

?? createmap.java~125~

?? CreateMyFirstMap
?? JAVA~125~
?? 第 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;
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)) ;
        //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)
 {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品福利电影一区二区三区四区| 最近日韩中文字幕| 1000精品久久久久久久久| 日韩福利视频网| 粉嫩一区二区三区性色av| 久久精品国产秦先生| av一区二区三区| 日韩欧美国产精品| 亚洲图片欧美激情| 高清beeg欧美| 久久综合av免费| 日韩精品五月天| 日本精品视频一区二区| 久久久久久一级片| 天天综合天天综合色| 色综合一区二区三区| 国产一区二区视频在线播放| 国产最新精品免费| 日韩亚洲电影在线| 亚洲va国产天堂va久久en| 福利电影一区二区三区| 亚洲精品成人少妇| 国产+成+人+亚洲欧洲自线| 亚洲色图都市小说| 9191国产精品| 一区av在线播放| 97aⅴ精品视频一二三区| 欧美精品日日鲁夜夜添| 国产精品久久三区| 欧美午夜免费电影| 精品欧美一区二区久久| 美脚の诱脚舐め脚责91| 91精品国产高清一区二区三区蜜臀| 亚洲国产欧美另类丝袜| 欧美视频日韩视频在线观看| 日本欧美肥老太交大片| 国产精品网站在线| 亚洲国产精品麻豆| 粉嫩在线一区二区三区视频| 亚洲午夜激情网站| 日本在线不卡视频一二三区| 在线播放一区二区三区| 成人午夜电影小说| 国产精品理论在线观看| 91精品国产入口| 99精品国产99久久久久久白柏| 日韩影院精彩在线| 亚洲欧洲韩国日本视频| 日韩欧美一级二级| 色视频一区二区| 亚洲第一会所有码转帖| 国产婷婷色一区二区三区| 国产99久久久国产精品| 久久久综合精品| 欧美在线不卡一区| 石原莉奈在线亚洲二区| 国产精品另类一区| 日韩欧美电影一二三| 在线观看国产日韩| 成人一级黄色片| 免费不卡在线观看| 成人免费视频app| 国产精品色婷婷久久58| 日韩一区二区精品| 在线免费一区三区| 成人免费精品视频| 韩国成人在线视频| 亚洲第一狼人社区| 亚洲美女精品一区| 91精品国产乱码久久蜜臀| 在线中文字幕一区| 成人精品亚洲人成在线| 亚洲欧美日韩一区二区三区在线观看| 26uuu久久综合| 正在播放亚洲一区| 欧美在线视频你懂得| www.激情成人| 97se亚洲国产综合自在线| 亚洲乱码日产精品bd| 欧美激情一区二区三区| 色女孩综合影院| 粉嫩aⅴ一区二区三区四区| 久久精品国产99久久6| 日韩综合在线视频| 亚洲午夜久久久久中文字幕久| 亚洲欧美在线另类| 中文字幕av一区二区三区高| 国产一区二区三区在线观看精品| 亚洲色图在线看| 亚洲国产高清在线| 国产欧美日韩在线观看| 欧美色精品在线视频| 国产一区二区久久| 精彩视频一区二区| 伊人色综合久久天天人手人婷| 欧美日韩国产综合草草| 国产精品一区二区三区四区| 亚洲一区精品在线| 久久久精品欧美丰满| 2021中文字幕一区亚洲| 精品久久久久一区| 欧美va在线播放| 日韩美一区二区三区| 日韩精品一区二区三区老鸭窝 | 成人高清在线视频| 亚洲成av人片www| 一区二区久久久久久| 一区二区三区四区乱视频| 亚洲精品免费在线观看| 一区二区三区av电影| 亚洲一区在线视频观看| 国产欧美精品一区二区色综合| 2020国产精品久久精品美国| 欧美精品一区二区在线播放| 在线观看不卡一区| 欧美三级视频在线播放| 欧美日韩在线综合| 欧美肥妇free| 欧美va亚洲va香蕉在线| 国产偷v国产偷v亚洲高清| 国产精品高潮呻吟久久| 亚洲欧美激情在线| 亚洲在线成人精品| 天天综合网 天天综合色| 蜜臀va亚洲va欧美va天堂| 韩国成人在线视频| 成人激情小说网站| 色婷婷综合久久久中文一区二区| 麻豆精品视频在线观看免费| 国产一区视频网站| 国产.欧美.日韩| 色综合激情久久| 欧美夫妻性生活| xnxx国产精品| 国产精品久久久久婷婷| 夜夜精品视频一区二区| 日韩国产精品久久久| 国产原创一区二区| 成人蜜臀av电影| 欧美激情一区不卡| 伊人色综合久久天天人手人婷| 亚洲成人av福利| 韩国欧美一区二区| 99久久国产综合精品女不卡| 欧美视频一区二区| 欧美xingq一区二区| 国产精品网站导航| 午夜欧美在线一二页| 国产一区在线观看麻豆| 91日韩精品一区| 亚洲影院免费观看| 免费不卡在线观看| 不卡的av中国片| 欧美浪妇xxxx高跟鞋交| 久久精品免视看| 一区二区三区在线播放| 免费看精品久久片| 国产成人精品免费看| 麻豆国产欧美一区二区三区| 久久99国产精品麻豆| 99re热这里只有精品视频| 欧美精品 日韩| 国产欧美日韩激情| 亚洲国产精品影院| 国产精品一区二区男女羞羞无遮挡| 日本精品免费观看高清观看| 久久亚洲精华国产精华液 | 岛国精品一区二区| 韩国成人精品a∨在线观看| 色综合天天狠狠| 日韩欧美高清在线| 一区二区高清在线| 久久精品久久综合| 91色九色蝌蚪| 久久影院视频免费| 亚洲国产精品一区二区www| 国产精品中文字幕日韩精品| 欧美日韩综合色| 国产精品色眯眯| 久久精品国产精品亚洲红杏 | 欧美日韩一区精品| 国产欧美日韩中文久久| 日本不卡视频在线观看| 色综合中文字幕国产| 日韩欧美专区在线| 一区二区三区久久| 亚洲伊人色欲综合网| 国产精品1区2区3区| 91.com视频| 一区二区三区在线视频观看| 国产精品亚洲成人| 日韩视频一区二区三区在线播放 | 色婷婷久久久亚洲一区二区三区| 日韩av不卡一区二区| 风间由美中文字幕在线看视频国产欧美| 欧美日韩一区小说| 国产一区二区三区四区五区入口| 福利一区二区在线| 亚洲精品在线三区| 日产国产高清一区二区三区|