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

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

?? createmap.java~126~

?? CreateMyFirstMap
?? JAVA~126~
?? 第 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)
 {
   System.out.println("get a "+e.getClass() +"\nwith message "+e.getMessage() ) ;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女性感视频久久| 欧美中文字幕久久| 亚洲欧美在线另类| 9191国产精品| 99麻豆久久久国产精品免费| 视频一区二区三区入口| 国产欧美精品一区二区三区四区| 欧美老肥妇做.爰bbww| a级精品国产片在线观看| 成人午夜激情视频| 中日韩av电影| 亚洲精品一线二线三线 | 欧美性淫爽ww久久久久无| 国产一区二区调教| 免费观看91视频大全| 亚洲最快最全在线视频| 中文字幕精品—区二区四季| 精品国产乱码久久久久久浪潮 | 亚洲欧洲日本在线| 欧美精品一区二区三区蜜桃| 欧美狂野另类xxxxoooo| 欧美视频在线播放| 色偷偷成人一区二区三区91| 成人免费视频视频在线观看免费| 精品在线你懂的| 久久99这里只有精品| 日本中文字幕不卡| 亚洲在线免费播放| 亚洲天堂2016| 亚洲视频一区在线| 亚洲欧美色综合| 欧美午夜不卡在线观看免费| 在线播放91灌醉迷j高跟美女 | 国产精品成人网| 国产亚洲精久久久久久| 久久综合视频网| 久久婷婷国产综合国色天香| 欧美草草影院在线视频| 欧美xxxxxxxx| 久久综合九色综合97婷婷| 欧美大片在线观看一区二区| 日韩精品中文字幕一区二区三区 | 国产又粗又猛又爽又黄91精品| 丝袜美腿亚洲一区| 午夜精品一区二区三区免费视频 | 久久综合给合久久狠狠狠97色69| 午夜精品视频一区| 日韩精品一区第一页| 爽好多水快深点欧美视频| 偷窥国产亚洲免费视频 | 成人午夜视频网站| 国产高清不卡一区| www.av精品| 欧洲精品一区二区| 制服.丝袜.亚洲.另类.中文| 欧美一区二区国产| 久久精品一区四区| 亚洲欧洲精品天堂一级| 亚洲一区二区av在线| 日韩国产成人精品| 国精产品一区一区三区mba视频| 国产激情精品久久久第一区二区| 风流少妇一区二区| 91免费国产视频网站| 欧美日韩一区二区在线观看| 日韩一级免费一区| 国产欧美综合在线观看第十页| 国产精品国产三级国产专播品爱网 | 日韩三级视频在线看| 久久久亚洲精品一区二区三区| 国产精品久久精品日日| 亚洲图片欧美综合| 极品少妇xxxx偷拍精品少妇| 不卡视频一二三四| 欧美猛男男办公室激情| 久久久91精品国产一区二区精品 | 亚洲一区中文在线| 青青草成人在线观看| 韩国成人福利片在线播放| jizz一区二区| 久久久国产精品不卡| 亚洲日本一区二区| 亚洲成a人v欧美综合天堂| 国产一区二区精品久久91| 在线视频欧美精品| 久久国产精品露脸对白| 青青青爽久久午夜综合久久午夜| 日韩二区在线观看| 91在线视频18| 欧美妇女性影城| 中文字幕不卡三区| 蜜臀久久99精品久久久画质超高清| 国产成人av网站| 3d动漫精品啪啪一区二区竹菊| 波多野结衣在线一区| 亚洲高清视频中文字幕| 国产不卡在线视频| 欧美军同video69gay| 国产调教视频一区| 日本女优在线视频一区二区| 白白色亚洲国产精品| 精品国产伦一区二区三区观看体验| 亚洲一区二区欧美| 国产精品一品二品| 日韩欧美一二三区| 白白色亚洲国产精品| 久久亚洲综合色| 亚洲色图制服诱惑| 国产白丝精品91爽爽久久| 91精品黄色片免费大全| 亚洲一区二区在线播放相泽| 成人爱爱电影网址| 欧美成人三级在线| 日韩高清一区二区| 欧美日韩国产一区二区三区地区| 国产精品色哟哟网站| 国产中文字幕精品| 欧美成人乱码一区二区三区| 午夜伦欧美伦电影理论片| 欧美在线制服丝袜| 一区二区三区精品在线| 懂色av一区二区三区免费观看| 欧美成人精精品一区二区频| 麻豆精品一区二区三区| 欧美一区二区三区系列电影| 香蕉久久夜色精品国产使用方法 | 91麻豆国产香蕉久久精品| 国产人伦精品一区二区| 国产一区二区三区视频在线播放| 在线综合+亚洲+欧美中文字幕| 亚洲成人免费电影| 欧美日韩激情在线| 午夜成人在线视频| 欧美日韩国产123区| 亚洲综合在线观看视频| 91成人免费在线视频| 一个色在线综合| 精品视频999| 亚洲成人777| 欧美高清www午色夜在线视频| 五月婷婷综合网| 日韩免费视频线观看| 九色综合狠狠综合久久| 久久先锋影音av鲁色资源网| 国产一区二区剧情av在线| 中文字幕乱码亚洲精品一区| 粉嫩一区二区三区性色av| 国产精品短视频| 色就色 综合激情| 性感美女久久精品| 日韩欧美亚洲国产精品字幕久久久 | 欧美丰满少妇xxxxx高潮对白 | 欧美在线影院一区二区| 日韩欧美中文字幕一区| 国产精品国产三级国产有无不卡| hitomi一区二区三区精品| 亚洲视频一区二区在线| 色视频欧美一区二区三区| 亚洲国产精品久久人人爱蜜臀| 欧美福利视频导航| 国产福利视频一区二区三区| 国产精品乱人伦| 欧美网站一区二区| 美女网站在线免费欧美精品| 久久九九久久九九| 色综合欧美在线视频区| 日韩国产精品91| 国产精品美女久久久久久久网站| 成人激情午夜影院| 亚洲妇熟xx妇色黄| 亚洲精品一区二区三区影院| 成人一级片网址| 婷婷中文字幕一区三区| 久久男人中文字幕资源站| 一本色道久久加勒比精品| 日本三级韩国三级欧美三级| 久久久精品2019中文字幕之3| 91麻豆国产福利精品| 精品一区二区在线免费观看| |精品福利一区二区三区| 色久综合一二码| 国内成人精品2018免费看| 有码一区二区三区| 欧美精品一区二区在线观看| 色香色香欲天天天影视综合网| 美女视频第一区二区三区免费观看网站 | 成人免费视频caoporn| 亚洲成a人片在线不卡一二三区| 精品国产乱码久久久久久浪潮| 91在线精品一区二区三区| 蜜臀av国产精品久久久久| 亚洲欧洲国产日韩| 337p粉嫩大胆噜噜噜噜噜91av| 欧美中文一区二区三区| 成人永久免费视频| 毛片不卡一区二区| 夜夜嗨av一区二区三区四季av | 色综合天天综合狠狠| 一区二区三区高清| 日韩亚洲欧美综合|