SystemApi

系统相关API

Members

static ESystemMode :number

操作类型

Properties:
Name Type Description
DebugMode number

调试模式

ReleaseMode number

释出模式

Methods

static closeMainWindow()

关闭主窗口

static closeProcessBar() → {void}

关闭进度条

Returns:
void

static convertWGS84toWorldCoord(dbB, dbL, dbH, funcRet) → {void}

WGS84坐标点转换到图形引擎中的三维空间坐标点

Parameters:
Name Type Description
dbB Number

大地纬度

dbL Number

大地经度

dbH Number

大地高

funcRet convertWGS84toWorldCoordCallBack
Returns:
void

static convertWorldCoordtoWGS84(dbX, dbY, dbZ, funcRet) → {void}

三维空间坐标点转换到图形引擎中的WGS84坐标点

Parameters:
Name Type Description
dbX Number

空间点X

dbY Number

空间点Y

dbZ Number

空间点Z

funcRet convertWorldCoordtoWGS84CallBack
Returns:
void

static dragMainWindow(funcRet) → {void}

拖拽主窗口

Parameters:
Name Type Description
funcRet dragMainWindowCallback
Returns:
void

static geometry(funcRet) → {void}

获取主窗口位置区域

Parameters:
Name Type Description
funcRet geometryCallback
Returns:
void

static getFolderPath(funcRet) → {void}

获取文件夹打开路径,弹出打开文件夹对话框

Parameters:
Name Type Description
funcRet getFolderPathCallback
Returns:
void
Example
var sPath = "";
getFolderPath(function(sPath){
alert(sPath === "X:\\path");
});

static getLocalRootPath(funcRet) → {void}

获取程序根路径

Parameters:
Name Type Description
funcRet getLocalRootPathCallback
Returns:
void
Example
var sPath = "";
getLocalRootPath(function(sPath){
alert(sPath === "X:\\rootPath");
});

static getOpenFilePath(funcRet) → {void}

获取打开文件路径,弹出打开文件对话框

Parameters:
Name Type Description
funcRet getOpenFilePathCallback
Returns:
void
Example
var sPath = "";
getOpenFilePath(function(sPath){
alert(sPath === "X:\\path");
}); 

static getSaveFilePath(funcRet) → {void}

获取文件保存路径,弹出保存对话框

Parameters:
Name Type Description
funcRet getSaveFilePathCallback
Returns:
void
Example
var sPath = "";
getSaveFilePath(function(sPath){
alert(sPath === "X:\\path");
});

static getScreenInfos(funcRet) → {void}

获取屏幕信息

Parameters:
Name Type Description
funcRet getScreenInfosCallBack
Returns:
void

static isMaxSized(funcRet) → {void}

判断当前应用程序是否最大化

Parameters:
Name Type Description
funcRet isMaxSizedCallback
Returns:
void

static moveMainWindow(x, y) → {void}

移动主窗口至点{x, y}处

Parameters:
Name Type Description
x Number

窗口x值

y Number

窗口y值

Returns:
void

static normalGeometry(funcRet) → {void}

获取主窗口标准视图下位置区域

Parameters:
Name Type Description
funcRet geometryCallback
Returns:
void

static resizeMainWindow(w, h) → {void}

设置主窗口大小

Parameters:
Name Type Description
w Number

窗口宽度

h Number

窗口高度

Returns:
void

static setGeometry(rect) → {void}

设置主窗口区域

Parameters:
Name Type Description
rect JSON

区域信息的json对象

Returns:
void

static setSystemMode(mode) → {void}

设置系统调试模式

Parameters:
Name Type Description
mode ESystemMode

调试模式

Returns:
void
Example
setSystemMode(ESystemMode.DebugMode);

static setToken(server, token) → {void}

设置Cim平台Token

Parameters:
Name Type Description
server string

cim服务器登录地址

token string

cim服务器登录成功后的token令牌

Returns:
void

static showMaxSize()

应用程序窗口最大化

static showMiniSize()

应用程序窗口最小化

static showNomalSize()

应用程序窗口正常化

static showProcessBar() → {void}

显示进度条

Returns:
void

Type Definitions

convertWGS84toWorldCoordCallBack(returnValue)

convertWGS84toWorldCoord回调函数

Parameters:
Name Type Description
returnValue JSON

格式如下:
{
x:double,
y:double,
z:double
}

convertWorldCoordtoWGS84CallBack(returnValue)

convertWorldCoordtoWGS84

Parameters:
Name Type Description
returnValue JSON

格式如下:
{
x:double,
y:double,
z:double
}

dragMainWindowCallback(returnValue)

dragMainWindow回调函数

Parameters:
Name Type Description
returnValue Boolean

是否窗口最大化

geometryCallback(returnValue)

geometry回调函数

Parameters:
Name Type Description
returnValue JSON

区域信息的json对象
格式如下:
{
x:int,
y:int,
w:int,
h:int
}

getFolderPathCallback(returnValue)

getFolderPath回调函数

Parameters:
Name Type Description
returnValue string

用户选择的绝对路径

getLocalRootPathCallback(returnValue)

getLocalRootPath回调函数

Parameters:
Name Type Description
returnValue string

应用程序根目录绝对路径

getOpenFilePathCallback(returnValue)

getOpenFilePath回调函数

Parameters:
Name Type Description
returnValue string

用户选择的绝对路径

getSaveFilePathCallback(returnValue)

getSaveFilePath回调函数

Parameters:
Name Type Description
returnValue string

用户选择的绝对路径

getScreenInfosCallBack(returnValue)

getScreenInfos回调函数

Parameters:
Name Type Description
returnValue Array.<JSON>

屏幕信息
格式如下:
[
{
index:int, //屏幕索引
rect:{x:int, y:int, w:int, h:int} //屏幕区域
}
]

isMaxSizedCallback(returnValue)

isMaxSized回调函数

Parameters:
Name Type Description
returnValue Boolean

当前应用程序是否最大化