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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? createmap.java~124~

?? CreateMyFirstMap
?? JAVA~124~
?? 第 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) ;//設(shè)置不是比例尺,設(shè)置的是視野范圍,即窗口寬度。

       // DoubleRect bounds = new DoubleRect(new DoublePoint(108.9607,34.2729),0.31,0.21);
        //設(shè)置該地圖的中心為(108.9607,34.2729)單位為經(jīng)緯度單位,0.31表示該地圖的經(jīng)度的最大值與最小值之差為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);
    //最后三個參數(shù)解釋一下,tablename表示將world.gst所對應(yīng)的數(shù)據(jù)保存到哪個表中
    //nameCol表示存儲表名的字段名稱是什么,mapDefCol表示存儲地圖數(shù)據(jù)的字段名稱又是什么
    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)
 {

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
制服丝袜av成人在线看| 亚洲一区二区美女| 亚洲综合在线第一页| 国产曰批免费观看久久久| 91蜜桃网址入口| 久久综合久久综合亚洲| 夜夜精品浪潮av一区二区三区| 国产精品影音先锋| 91麻豆精品国产自产在线观看一区 | 亚洲精品一区二区三区精华液| 国产精品久久久久久久久免费丝袜 | 国产精品夫妻自拍| 韩国中文字幕2020精品| 欧美亚洲日本一区| 日本一二三四高清不卡| 精品一区二区久久| 欧美一级在线视频| 亚洲一区二区偷拍精品| 99久久er热在这里只有精品15| 精品国产乱码久久久久久老虎| 亚洲成人你懂的| 日本伦理一区二区| 中文字幕中文乱码欧美一区二区 | 日韩主播视频在线| 91老师国产黑色丝袜在线| 精品国产一二三| 天天色 色综合| 欧美视频在线一区二区三区| 中文字幕一区二区三区色视频 | 亚洲香蕉伊在人在线观| 99精品偷自拍| 国产精品成人一区二区三区夜夜夜 | 欧美国产成人精品| 国产成人在线视频免费播放| 欧美电影在线免费观看| 亚洲国产va精品久久久不卡综合| 一本大道久久a久久综合| 国产精品嫩草99a| 国产一区二区中文字幕| 精品日本一线二线三线不卡| 蜜桃在线一区二区三区| 国产伦精品一区二区三区免费| 欧美一区二区三区免费大片| 天堂va蜜桃一区二区三区| 欧美日韩不卡一区| 丝袜国产日韩另类美女| 丁香激情综合五月| 中文字幕成人av| www.性欧美| 成人欧美一区二区三区黑人麻豆| 成人app网站| 亚洲欧美日本在线| 色噜噜夜夜夜综合网| 一区二区理论电影在线观看| 欧美综合一区二区三区| 一区二区三区成人| 欧美日韩一区二区三区在线| 亚洲国产一区二区在线播放| 欧美日韩一区二区三区免费看 | 欧美激情中文字幕| aaa亚洲精品| 亚洲一区二区视频在线观看| 国产精品一线二线三线| 中文幕一区二区三区久久蜜桃| 粉嫩欧美一区二区三区高清影视| 国产精品久久久久9999吃药| 色综合久久久久综合| 伊人婷婷欧美激情| 51午夜精品国产| 九色综合狠狠综合久久| 国产欧美精品国产国产专区| a美女胸又www黄视频久久| 一区二区欧美在线观看| 日韩欧美不卡一区| 亚洲国产中文字幕在线视频综合| 91精品久久久久久久99蜜桃| 蜜桃视频在线一区| 国产精品理论片在线观看| 日本道精品一区二区三区| 日本视频中文字幕一区二区三区| 精品噜噜噜噜久久久久久久久试看| 国产成人av电影| 亚洲精品国产第一综合99久久| 欧美人与禽zozo性伦| 久久精品国产一区二区| 国产精品福利一区| 国产99久久久国产精品潘金| 亚洲免费视频成人| 欧美一三区三区四区免费在线看| 国产精品18久久久久久久网站| 亚洲免费观看高清完整版在线| 欧美一区二区三区系列电影| 国产白丝网站精品污在线入口| 亚洲精品视频自拍| 精品国产91九色蝌蚪| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 成人黄色一级视频| 亚洲成人久久影院| 日本一区二区在线不卡| 在线观看日韩国产| 国内精品在线播放| 亚洲综合网站在线观看| 久久综合久久综合久久| 欧美中文字幕一二三区视频| 国产专区欧美精品| 亚洲成人动漫一区| 国产精品美女久久久久久久| 成人影视亚洲图片在线| 日韩av一区二区三区四区| 国产精品麻豆99久久久久久| 欧美肥大bbwbbw高潮| www.av亚洲| 精品一区二区三区日韩| 亚洲一区二区偷拍精品| 国产精品美女久久久久久久| 欧美va亚洲va在线观看蝴蝶网| 91高清视频免费看| 国产成人精品综合在线观看| 天堂av在线一区| 亚洲欧美日韩国产成人精品影院| 色综合久久中文字幕综合网| 国产精品综合av一区二区国产馆| 午夜欧美一区二区三区在线播放 | 宅男噜噜噜66一区二区66| 一本色道久久综合精品竹菊| 国产一区中文字幕| 日韩精品91亚洲二区在线观看| 亚洲男人天堂一区| 欧美国产综合一区二区| 欧美一区二区在线观看| 欧美亚洲综合在线| 91伊人久久大香线蕉| 亚洲一区二区三区自拍| 中文字幕在线不卡国产视频| 精品99久久久久久| 在线电影欧美成精品| 欧美在线一区二区| 色哟哟精品一区| 91丝袜高跟美女视频| 成人av在线播放网站| 国产 欧美在线| 国产在线精品一区二区| 久久精品国产99久久6| 秋霞成人午夜伦在线观看| 亚洲国产精品久久人人爱蜜臀| 亚洲欧美一区二区三区国产精品| 中文字幕免费观看一区| 久久久久久久综合色一本| 欧美精品一区二区三区高清aⅴ | 欧美在线免费观看亚洲| 色悠久久久久综合欧美99| 99久久精品国产一区二区三区| 成人午夜又粗又硬又大| 国产91丝袜在线播放| 国产成人午夜99999| 国产精品亚洲第一区在线暖暖韩国| 美日韩一区二区三区| 日本中文字幕不卡| 日韩电影一二三区| 日本成人在线不卡视频| 美女国产一区二区三区| 激情久久五月天| 国产综合久久久久影院| 黄一区二区三区| 国产一级精品在线| 国产精品99精品久久免费| 国产盗摄视频一区二区三区| 国产99久久久久| 成人97人人超碰人人99| 91蜜桃传媒精品久久久一区二区| 91麻豆6部合集magnet| 欧美伊人久久久久久久久影院| 精品视频在线免费观看| 欧美电影一区二区| 欧美精品一区二区三区蜜桃| 欧美激情在线一区二区| 亚洲欧洲韩国日本视频| 一区二区三区中文字幕精品精品 | 欧美国产精品劲爆| 欧美午夜视频网站| 欧美日韩第一区日日骚| 欧美精品一二三四| 精品国产乱码久久久久久闺蜜| 久久免费视频一区| 国产精品久久久久国产精品日日| 亚洲美女视频一区| 亚洲国产美女搞黄色| 麻豆精品精品国产自在97香蕉| 国产一区二区视频在线| 成人国产精品免费观看动漫| 91亚洲精品久久久蜜桃网站| 另类小说色综合网站| 国产麻豆精品在线| 91在线播放网址| 欧美老女人第四色| 久久久99免费| 日韩理论片一区二区| 午夜精品久久久久久久久久久| 久久国产夜色精品鲁鲁99| 成人午夜视频福利|