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

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

?? 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) ;//設(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| 久久久久久久网| 久久午夜老司机| 久久久久青草大香线综合精品| 日韩免费电影一区| 日韩欧美一区中文| 日韩欧美一级二级| 精品99999| 国产欧美日韩亚州综合| 久久久噜噜噜久久中文字幕色伊伊| 久久女同精品一区二区| 日本一区二区三区国色天香 | 久久狠狠亚洲综合| 久久99久久精品| 韩国成人精品a∨在线观看| 久久精品久久久精品美女| 秋霞电影一区二区| 精品伊人久久久久7777人| 国产成人亚洲综合色影视 | 欧美精品一区男女天堂| 久久亚洲一区二区三区四区| 久久久久高清精品| 亚洲欧美日韩精品久久久久| 亚洲少妇最新在线视频| 香蕉成人伊视频在线观看| 美女在线视频一区| 粉嫩一区二区三区在线看| 色综合天天做天天爱| 欧美日韩免费一区二区三区视频| 欧美一区二区免费观在线| 久久亚区不卡日本| 日韩理论片一区二区| 亚洲成人www| 狠狠色综合色综合网络| 99在线精品一区二区三区| 欧美色精品天天在线观看视频| 日韩美女在线视频| 国产精品国产三级国产a| 伊人夜夜躁av伊人久久| 老司机免费视频一区二区| 国产不卡在线一区| 欧美日韩中文字幕一区二区| 久久综合狠狠综合久久综合88 | 五月天激情综合网| 国产成人日日夜夜| 在线观看区一区二| 久久毛片高清国产| 亚洲国产va精品久久久不卡综合| 黄色精品一二区| 在线观看日韩毛片| 久久久影视传媒| 亚洲福利一二三区| 懂色av一区二区夜夜嗨| 欧美猛男超大videosgay| 亚洲蜜臀av乱码久久精品| 性久久久久久久久| 成人高清伦理免费影院在线观看| 欧美人与禽zozo性伦| 国产精品卡一卡二| 麻豆国产精品官网| 精品视频123区在线观看| 久久久久97国产精华液好用吗| 亚洲图片欧美色图| 成人av第一页| 精品三级av在线| 亚洲一区在线观看视频| 处破女av一区二区| 日韩欧美aaaaaa| 亚洲成在人线免费| 99精品国产视频| 欧美激情综合在线| 蜜桃视频一区二区| 欧美精品一二三| 亚洲人被黑人高潮完整版| 韩国v欧美v亚洲v日本v| 91精品国产综合久久久久久久久久| 成人免费一区二区三区视频 | 国产**成人网毛片九色| 日韩午夜激情av| 一区二区国产视频| 97精品电影院| 国产精品麻豆欧美日韩ww| 精品一区二区综合| 欧美一区二区在线观看| 香蕉加勒比综合久久| 欧美综合欧美视频| 亚洲欧美韩国综合色| 岛国av在线一区| 欧美精彩视频一区二区三区| 久久国产精品无码网站| 日韩一区二区在线观看视频| 香港成人在线视频| 欧美日韩免费电影| 午夜视频一区二区| 欧美日韩国产精品成人| 亚洲一区二区视频| 色婷婷国产精品| 一级精品视频在线观看宜春院| 99国产精品久| 亚洲人成精品久久久久| 91免费小视频| 亚洲精品第一国产综合野| 91在线观看地址| 一区二区在线观看av| 51精品视频一区二区三区| 五月天国产精品| 日韩一区二区三区电影在线观看 | 美女被吸乳得到大胸91| 日韩一区二区三区观看| 男女男精品视频| 精品久久久久久久久久久院品网 | 99国产精品国产精品久久| 国产精品白丝在线| 91老司机福利 在线| 亚洲免费观看视频| 欧美日产在线观看| 狠狠色狠狠色综合| 日本一区二区三区dvd视频在线| 成人av网站在线观看免费| 亚洲人成人一区二区在线观看| 色欧美日韩亚洲| 午夜视频一区二区三区| 欧美成人精品1314www| 久久不见久久见免费视频7 | 亚洲综合清纯丝袜自拍| 欧美丰满嫩嫩电影| 精品在线免费观看| 日本一区二区不卡视频| 97精品电影院| 亚洲bt欧美bt精品777| 欧美成人aa大片| 成人开心网精品视频| 亚洲蜜桃精久久久久久久| 欧美肥胖老妇做爰| 国产成人免费9x9x人网站视频| 最新高清无码专区| 欧美色图激情小说| 紧缚奴在线一区二区三区| 国产精品每日更新| 欧美精品乱人伦久久久久久| 韩国欧美国产1区| 亚洲欧美日韩一区二区 | 亚洲视频免费在线观看| 欧美日韩不卡在线| 国产福利一区二区三区视频在线 | 91国产免费观看| 久久精品国产亚洲a| 最新热久久免费视频| 欧美巨大另类极品videosbest| 国产精品1区二区.| 午夜精品视频一区| 国产午夜三级一区二区三| 91国模大尺度私拍在线视频| 久久精品国产网站| 一区二区三区四区精品在线视频| 日韩欧美中文字幕一区| 91视频在线观看| 激情综合网激情| 亚洲一二三区在线观看| 国产婷婷一区二区| 欧美精品粉嫩高潮一区二区| 成人性生交大片免费看视频在线| 三级亚洲高清视频| 亚洲日本在线视频观看| 精品国产电影一区二区| 欧美日韩在线三区| 成人黄动漫网站免费app| 蜜桃在线一区二区三区| 一区二区三区四区不卡在线| 国产亚洲视频系列| 日韩亚洲欧美在线| 欧美亚男人的天堂| 波多野结衣中文字幕一区二区三区| 亚洲成人1区2区| 一区二区在线观看不卡| 国产精品天天摸av网| 日韩欧美国产综合一区| 欧美视频一区在线| 91在线无精精品入口| 国产成人在线视频播放| 久久国产精品无码网站| 午夜视频在线观看一区二区| 亚洲日本在线看| 中文在线一区二区| 久久精品一区二区三区不卡| 日韩一区二区不卡| 欧美日韩综合不卡| 欧洲国内综合视频| 一本高清dvd不卡在线观看| 国产在线国偷精品免费看| 日韩国产精品久久久久久亚洲| 亚洲综合成人在线视频| 亚洲男人天堂av网| 亚洲视频免费在线| 亚洲裸体xxx| 亚洲激情图片qvod| 一区二区三区四区不卡视频|