new ov2D3D.OvControl(target, mode)
2D3D圖台控制器
| Name | Type | Description | 
|---|---|---|
| target | String | ID 欲綁定DIV的ID。 | 
| mode | String | 預設的顯示模式,若不指定則預設顯示3D,其值必須為ov2D3D_DISPLAY_DIMENSION的值,注意若希望預設顯示2D建議使用ov2D3D.OvControl.DefaultTo2D | 
Example
var View2D3D = new ov2D3D.OvControl("view");
Classes
Members
- 
    Document2DCMapDocument
- 
    
    2D文件物件 
- 
    View2DCMapView
- 
    
    2D視圖 
- 
    View3Dov.TerrainView
- 
    
    3D地形視圖 
Methods
- 
    abortInput()common/PilotGaea-2D3D-glue.js, line 616
- 
    
    
    中斷一個輸入。 ExampleView2D3D.abortInput(); 
- 
    abortMeasure()common/PilotGaea-2D3D-glue.js, line 662
- 
    
    
    中斷測量。 ExampleView2D3D.abortMeasure(); 
- 
    addWMTSOverlay(URL, ID, FromPGMapServer, LayerName){ov2D3D.WMTSOverlayLayer2D3D}common/PilotGaea-2D3D-glue.js, line 246
- 
    
    
    新增一張WMTS疊加圖層 Name Type Description URLString WMTS來源位置。 IDString WMTS的索引名稱。 FromPGMapServerBoolean 此圖層服務是否來自PilotGaea伺服器。 LayerNameString 圖層名稱。 Returns:Type Description ov2D3D.WMTSOverlayLayer2D3D 圖層手柄 ExampleView2D3D.addWMTSOverlay('http://maps.nlsc.gov.tw/S_Maps/wmts', 'TOWN', false); 
- 
    bounceTo(Point)common/PilotGaea-2D3D-glue.js, line 741
- 
    
    
    彈跳移動視圖視野到指定位置上。 Name Type Description PointGeoPoint 指定位置。 ExampleView2D3D.bounceTo(new GeoPoint(13532015.083096033,2883016.813265035)); 
- 
    clearMeasure()common/PilotGaea-2D3D-glue.js, line 626
- 
    
    
    清除輸入。 ExampleView2D3D.clearMeasure(); 
- 
    elasticTo(Point)common/PilotGaea-2D3D-glue.js, line 723
- 
    
    
    吸附移動視圖視野到指定位置上。 Name Type Description PointGeoPoint 指定位置。 ExampleView2D3D.elasticTo(new GeoPoint(13532015.083096033,2883016.813265035)); 
- 
    flyTo(Point)common/PilotGaea-2D3D-glue.js, line 676
- 
    
    
    飛越移動視圖視野到指定位置上。 Name Type Description PointGeoPoint 指定位置。 ExampleView2D3D.flyTo(new GeoPoint(13532015.083096033,2883016.813265035)); 
- 
    getCurrentMode(){ov2D3D_DISPLAY_DIMENSION}common/PilotGaea-2D3D-glue.js, line 880
- 
    
    
    取得目前圖台展示模式。 Returns:Type Description ov2D3D_DISPLAY_DIMENSION 目前的展示模式。 
- 
    getWMTSOverlayCount(){Number}common/PilotGaea-2D3D-glue.js, line 301
- 
    
    
    取得所有WMTS疊加圖層數。 Returns:Type Description Number 疊加圖層數。 Examplevar count = View2D3D.getWMTSOverlayCount(); 
- 
    getWMTSOverlays(){Array.<ov2D3D.WMTSOverlayLayer2D3D>}common/PilotGaea-2D3D-glue.js, line 291
- 
    
    
    取得所有WMTS疊加圖層手柄。 Returns:Type Description Array.<ov2D3D.WMTSOverlayLayer2D3D> 疊加圖層手柄。 Examplevar handles = View2D3D.getWMTSOverlays(); 
- 
    initView(EPSG, TerrainSrcIPAddress, TerrainSrcPort, TerrainSrcName, WMTSURL, WMTSID, WMTSProxy, Callback)common/PilotGaea-2D3D-glue.js, line 404
- 
    
    
    初始化圖台視圖。 Name Type Description EPSGNumber 指示圖台的EPSG。 TerrainSrcIPAddressString 地形來源的伺服器位址。 TerrainSrcPortString 地形來源的伺服器埠口號。 TerrainSrcNameString 地形圖層在伺服器上的名稱。 WMTSURLString 底圖的WMTS來源位置。 WMTSIDString 底圖的WMTS的索引名稱。 WMTSProxyBoolean 指示3D圖台底圖是否要使用代理來進行取圖。 Callbackfunction 初始化完成後的回呼。 Examplevar View2D3D = new ov2D3D.OvControl("view"); 
 View2D3D.initView(3857, "127.0.0.1", "8080", "terrain", "http://maps.nlsc.gov.tw/S_Maps/wmts", "PHOTO2", true, function (){});
- 
    initViewParameter(param, Callback)common/PilotGaea-2D3D-glue.js, line 439
- 
    
    
    使用物件參數初始化圖台視圖。 Name Type Description paramObject Name Type Description epsgNumber 指示圖台的EPSG。 terrainIpString 地形來源的伺服器位址。 terrainPortString 地形來源的伺服器埠口號。 terrainNameString 地形圖層在伺服器上的名稱。 terrainSettingObject 地形圖層的初始化設定。 wmtsUrlString 底圖的WMTS來源位置。 wmtsIdentifierString 底圖的WMTS的索引名稱。 wmtsProxyBoolean 指示3D圖台底圖是否要使用代理來進行取圖。 Callbackfunction 初始化完成後的回呼。 Examplevar View2D3D = new ov2D3D.OvControl("view"); 
 View2D3D.initViewParameter({
 epsg: 3857,
 terrainIp: "127.0.0.1",
 terrainPort: "8080",
 terrainName: "terrain",
 terrainSetting: {}
 wmtsUrl: "http://maps.nlsc.gov.tw/S_Maps/wmts",
 wmtsIdentifier: "PHOTO2",
 wmtsProxy: true
 }, function (){});
- 
    inputPoint(Success, Fail)common/PilotGaea-2D3D-glue.js, line 514
- 
    
    
    輸入一個點。 Name Type Description Successfunction 點輸入成功的回呼,會返回一個幾何。 Failfunction 點輸入失敗的回呼。 ExampleView2D3D.inputPoint( 
 function(Geo){
 //TODO
 },
 function(){
 //TODO
 }
 );
- 
    inputPolygon(Success, Fail)common/PilotGaea-2D3D-glue.js, line 477
- 
    
    
    輸入一個多邊形。 Name Type Description Successfunction 多邊形輸入成功的回呼,會返回一個幾何。 Failfunction 多邊形輸入失敗的回呼。 ExampleView2D3D.inputPolygon( 
 function(Geo){
 //TODO
 },
 function(){
 //TODO
 }
 );
- 
    inputPolyline(Success, Fail)common/PilotGaea-2D3D-glue.js, line 588
- 
    
    
    輸入一個聚合線。 Name Type Description Successfunction 聚合線輸入成功的回呼,會返回一個幾何。 Failfunction 聚合線輸入失敗的回呼。 ExampleView2D3D.inputPolyline( 
 function(Geo){
 //TODO
 },
 function(){
 //TODO
 }
 );
- 
    inputRectangle(Success, Fail)common/PilotGaea-2D3D-glue.js, line 551
- 
    
    
    輸入一個矩形。 Name Type Description Successfunction 矩形輸入成功的回呼,會返回一個幾何。 Failfunction 矩形輸入失敗的回呼。 ExampleView2D3D.inputRectangle( 
 function(Geo){
 //TODO
 },
 function(){
 //TODO
 }
 );
- 
    isUnderGround(){Boolean}common/PilotGaea-2D3D-glue.js, line 455
- 
    
    
    指示目前3D攝影機位置是否在地底,若是2D模式將會直接返回false。 Returns:Type Description Boolean 是否在地底。 
- 
    measureArea()common/PilotGaea-2D3D-glue.js, line 636
- 
    
    
    測量面積。 ExampleView2D3D.measureArea(); 
- 
    measureLength()common/PilotGaea-2D3D-glue.js, line 649
- 
    
    
    測量長度。 ExampleView2D3D.measureLength(); 
- 
    modeSwap(Complete)common/PilotGaea-2D3D-glue.js, line 867
- 
    
    
    2D與3D圖台相互切換。 Name Type Description Completefunction 當切換完畢時的回呼。 ExampleView2D3D.modeSwap(function(){ 
 alert("done!");
 });
- 
    moveTo(Point)common/PilotGaea-2D3D-glue.js, line 776
- 
    
    
    瞬間移動視圖視野到指定位置上。 Name Type Description PointGeoPoint 指定位置。 ExampleView2D3D.moveTo(new GeoPoint(13532015.083096033,2883016.813265035)); 
- 
    moveWMTSOverlayTo(Overlay, Index)common/PilotGaea-2D3D-glue.js, line 332
- 
    
    
    移動一張WMTS疊加圖層到指定位置上。 Name Type Description Overlayov2D3D.WMTSOverlayLayer2D3D 疊加圖層手柄。 IndexNumber 疊加圖層位置。 ExampleView2D3D.moveWMTSOverlayToBottom(handle, 3);//移到位置3 
- 
    moveWMTSOverlayToBottom(Overlay)common/PilotGaea-2D3D-glue.js, line 321
- 
    
    
    移動一張WMTS疊加圖層到最底層。 Name Type Description Overlayov2D3D.WMTSOverlayLayer2D3D 疊加圖層手柄。 ExampleView2D3D.moveWMTSOverlayToBottom(handle); 
- 
    moveWMTSOverlayToTop(Overlay)common/PilotGaea-2D3D-glue.js, line 311
- 
    
    
    移動一張WMTS疊加圖層到最上層。 Name Type Description Overlayov2D3D.WMTSOverlayLayer2D3D 疊加圖層手柄。 ExampleView2D3D.moveWMTSOverlayToTop(handle); 
- 
    panTo(Point)common/PilotGaea-2D3D-glue.js, line 704
- 
    
    
    平移移動視圖視野到指定位置上。 Name Type Description PointGeoPoint 指定位置。 ExampleView2D3D.panTo(new GeoPoint(13532015.083096033,2883016.813265035)); 
- 
    removeAllWMTSOverlay()common/PilotGaea-2D3D-glue.js, line 277
- 
    
    
    移除所有WMTS疊加圖層。 ExampleView2D3D.removeAllWMTSOverlay(); 
- 
    removeWMTSOverlay(Overlay)common/PilotGaea-2D3D-glue.js, line 260
- 
    
    
    移除一張WMTS疊加圖層。 Name Type Description Overlayov2D3D.WMTSOverlayLayer2D3D 圖層手柄。 ExampleView2D3D.removeWMTSOverlay(handle); 
- 
    setBaseLayer(WMTSURL, WMTSName, FromPilotGaea, Proxy)common/PilotGaea-2D3D-glue.js, line 835
- 
    
    
    設定視圖底圖。 Name Type Description WMTSURLString 底圖的WMTS來源位置。 WMTSNameString 底圖的WMTS的索引名稱。 FromPilotGaeaBoolean 指示此圖層服務是否來自PilotGaea伺服器。 ProxyBoolean 指示3D圖台底圖是否要使用代理來進行取圖。 ExampleView2D3D.setBaseLayer('http://maps.nlsc.gov.tw/S_Maps/wmts', 'EMAP5');