﻿<!--//
//Copyright© 2004 Major Technologies, Inc. All Rights Reserved.

//---------------------------  iMap Property  ---------------------------------------

//-- 取得顯示自訂地標物件的地圖範圍值(地圖寬度) (2008/02/20 Add)
function getCustomerSymbolGetRange() {
    var strValue = window.document.myFlash.GetVariable("gCustomerSymbolGetRange");
	return strValue;
}

//-- 取得自訂地標物件的資料來源網頁名稱 (2008/02/20 Add)
function getCustomerSymbolProcPage() {
    var strValue = window.document.myFlash.GetVariable("gCustomerSymbolProcPage");
	return strValue;
}

//-- 取得繪製的圖形的座標點 XML (2006/6/8 Add)
function getDrawObjectPoints() {
    var strValue = window.document.myFlash.GetVariable("gDraw_xml");
	return strValue;
}

//-- 取得圖形填色時的透明度, 由0~100 (2006/7/27 Add)
function getDrawFillAlpha() {
	var strValue = window.document.myFlash.GetVariable("gFillAlpha");
	return strValue;
}

//-- 2007/12/07 Add
//-- 取得輸出的地圖影像檔案名稱
function getExportImageFileName() {
    var strValue = window.document.myFlash.GetVariable("gstrExportImageFileName");
	return strValue;
}

//-- 取得要求(Quest)並載入地圖地圖影像所花費的時間(豪秒, ms) (2006/6/22 Edit)
function getGetMapTime() {
	var strValue = window.document.myFlash.GetVariable("gGetMapTime");
	return strValue;
}

//-- 取得載入地圖地圖影像所花費的時間(豪秒, ms) (2006/6/22 Add)
function getLoadMapTime() {
	var strValue = window.document.myFlash.GetVariable("gLoadMapTime");
	return strValue;
}

//-- 取得地圖影像下邊界
function getMapBottom() {
	var strValue = window.document.myFlash.GetVariable("gMapBottom");
	return strValue;
}

//-- 取得地圖影像垂直高度
function getMapHeight() {
	var strValue = window.document.myFlash.GetVariable("gMAP_V");
	return strValue;
}

//-- 取得地圖影像存放目錄
function getMapImagePath() {
	var strValue = window.document.myFlash.GetVariable("gMapImagePath");
	return strValue;
}

//-- 取得地圖影像左邊界
function getMapLeft() {
	var strValue = window.document.myFlash.GetVariable("gMapLeft");
	return strValue;
}

//-- 取得圖資的專案名稱
function getMapProjectName() {
	var strValue = window.document.myFlash.GetVariable("gProjectName");
	return strValue;
}

//-- 取得地圖影像右邊界
function getMapRight() {
	var strValue = window.document.myFlash.GetVariable("gMapRight");
	return strValue;
}

//-- 取得要顯示的自定地標類別字串 (2008/02/21 Add)
function getMapShowCustomerSymbolClass() {
    var strValue = window.document.myFlash.GetVariable("gShowCustomerSymbolClassName");
	return strValue;
}

//-- 取得顯示的圖層名稱
function getMapShowLayerName() {
	var strValue = window.document.myFlash.GetVariable("gShowLayerNameStr");
	return strValue;
}

//-- 取得作用中的主題圖名稱
function getMapThemeName() {
	var strValue = window.document.myFlash.GetVariable("gThemeName");
	return strValue;
}

//-- 取得地圖影像上邊界
function getMapTop() {
	var strValue = window.document.myFlash.GetVariable("gMapTop");
	return strValue;
}

//-- 取得隱藏(不顯示)的圖層名稱
function getMapUnShowLayerName() {
	var strValue = window.document.myFlash.GetVariable("gUnShowLayerNameStr");
	return strValue;
}

//-- 取得地圖影像水平寬度
function getMapWidth() {
	var strValue = window.document.myFlash.GetVariable("gMAP_H");
	return strValue;
}

//-- 取得應用程式網址
function getMapWebPagePath() {
	var strValue = window.document.myFlash.GetVariable("gWebPagePath");
	return strValue;
}

//-- 取得播放軌跡速度, 單位為秒
function getTrackPlayTimer() {
	var strValue = window.document.myFlash.GetVariable("gTrackPlayTimer");
	return strValue;
}

//-------------------------------------------------------------------------------------
//------------------------------------ Set Function -----------------------------------

//-- 設定電子地圖使用的座標系統
function setCoordSystem(strCoordSystem) {
	window.document.myFlash.SetVariable("gCoordSystem", strCoordSystem);
}

//-- 2007/10/11 Add
//-- 設定電子地圖自訂Menu(按右鍵時顯示)的顯示文字字串
function setCustomerMenuCaptions(strCaptions) {
    window.document.myFlash.SetVariable("gstrCustomerMenuCaptions", strCaptions);
}
//-- 2007/10/18 Add
//-- 設定自訂圖示 Menu(按右鍵時顯示)的顯示文字字串
function setCustomerSymbolMenuCaptions(strCaptions) {
    window.document.myFlash.SetVariable("gstrCustomerSymbolMenuCaptions", strCaptions);
}

//-- 2006/10/22 Add
//-- 設定自訂地標物件資料
function setCustomerSymbolObject(strObjectStr) {
    window.document.myFlash.SetVariable("gstrCustomerSymbolObject", strObjectStr);
}

//-- 2007/10/08 Add
//-- 設定取得自訂地標物件的地圖範圍(right - left)
function setCustomerSymbolGetRange(dblRange) {
    window.document.myFlash.SetVariable("gCustomerSymbolGetRange", dblRange);
}

//-- 設定取得自訂地標物件的網頁名稱
function setCustomerSymbolProcPage(strProcPage) {
    window.document.myFlash.SetVariable("gCustomerSymbolProcPage", strProcPage);
}

//-- 設定圖形填色時的透明度, 由0~100 ( 2006/7/27 Add )
function setDrawFillAlpha(lngAlpha) {
	window.document.myFlash.SetVariable("gFillAlpha", lngAlpha);
}

//-- 設定電子地圖繪圖的填充顏色 ( 2006/6/28 Add )
function setDrawFillColor(lngFillColor) {
	window.document.myFlash.SetVariable("gFillColor", lngFillColor);
}

//-- 設定電子地圖繪圖的線條顏色 ( 2007/5/21 Add )
function setDrawLineWidth(intLineWidth) {
	window.document.myFlash.SetVariable("penSize", intLineWidth);
}

//-- 設定電子地圖繪圖時是否要將封閉的圖形（如圓形、矩形、多邊形等）填滿顏色 ( 2006/6/28 Add )
function setDrawFillStyle(intFillStyle) {
	window.document.myFlash.SetVariable("gFillStyle", intFillStyle);
}

//-- 設定電子地圖繪圖的線條顏色 ( 2006/6/28 Add )
function setDrawLineColor(lngLineColor) {
	window.document.myFlash.SetVariable("gLineColor", lngLineColor);
}

//-- 設定電子地圖使用的座標系統 ( 2006/6/22 Add )
function setDrawOneObject(blnDrawOne) {
	window.document.myFlash.SetVariable("gblnDrawOne", blnDrawOne);
}

//-- 2007/10/16 Add
//-- 設定圖形XML字串
function setDrawObjectXMLStr(strXMLStr) {
    window.document.myFlash.SetVariable("gDrawXMLStr", strXMLStr);
}

//---------------------------------------------------------------------------------
//-- 設定動態顯示的物件資料
//-- 輸入: strObjectStr 字串值，欲顯示的物件資料。此字串資料必須符合標準的XML格式，其XML格式如下：
//-- <objectxml>
//-- <object id=物件識別碼 x=X座標 y=Y座標 angle=角度 alt=輔助說明 tag=額外資料>
//-- <icon path=存放位置 w=寬度 h=高度 align=水平對齊 valign=垂直對齊 sx=X軸偏移量 sy=Y軸偏移量 />
//-- </object>
//-- </objectxml>
//---------------------------------------------------------------------------------

//-- 2008/09/26 Add
//-- 設定電子地圖縮放等級 1 時的每 Pixel 所能允許的最大座標值
function setCoordPerPixelLevel1(dblValue) {
	window.document.myFlash.SetVariable("gdblCoordPerPixelLevel1", dblValue);
}
//-- 設定電子地圖縮放等級 2 時的每 Pixel 所能允許的最大座標值
function setCoordPerPixelLevel2(dblValue) {
	window.document.myFlash.SetVariable("gdblCoordPerPixelLevel2", dblValue);
}
//-- 設定電子地圖縮放等級 3 時的每 Pixel 所能允許的最大座標值
function setCoordPerPixelLevel3(dblValue) {
	window.document.myFlash.SetVariable("gdblCoordPerPixelLevel3", dblValue);
}
//-- 設定電子地圖縮放等級 4 時的每 Pixel 所能允許的最大座標值
function setCoordPerPixelLevel4(dblValue) {
	window.document.myFlash.SetVariable("gdblCoordPerPixelLevel4", dblValue);
}
//-- 設定電子地圖縮放等級 5 時的每 Pixel 所能允許的最大座標值
function setCoordPerPixelLevel5(dblValue) {
	window.document.myFlash.SetVariable("gdblCoordPerPixelLevel5", dblValue);
}
//-- 設定電子地圖縮放等級 6 時的每 Pixel 所能允許的最大座標值
function setCoordPerPixelLevel6(dblValue) {
	window.document.myFlash.SetVariable("gdblCoordPerPixelLevel6", dblValue);
}
//-- 設定電子地圖縮放等級 7 時的每 Pixel 所能允許的最大座標值
function setCoordPerPixelLevel7(dblValue) {
	window.document.myFlash.SetVariable("gdblCoordPerPixelLevel7", dblValue);
}
//-- 設定電子地圖縮放等級 8 時的每 Pixel 所能允許的最大座標值
function setCoordPerPixelLevel8(dblValue) {
	window.document.myFlash.SetVariable("gdblCoordPerPixelLevel8", dblValue);
}
//-- 設定電子地圖縮放等級 9 時的每 Pixel 所能允許的最大座標值
function setCoordPerPixelLevel9(dblValue) {
	window.document.myFlash.SetVariable("gdblCoordPerPixelLevel9", dblValue);
}
//-- 設定電子地圖縮放等級 10 時的每 Pixel 所能允許的最大座標值
function setCoordPerPixelLevel10(dblValue) {
	window.document.myFlash.SetVariable("gdblCoordPerPixelLevel10", dblValue);
}

function setInsertShowObject(strObjectStr) {
	window.document.myFlash.SetVariable("gInsertShowObject", strObjectStr);
}

//-- 設定是否顯示動態插入物件的軌跡
function setInsertShowObjectTrackLine(blnShow) {
	window.document.myFlash.SetVariable("gInsertShowObjectTrackLine", blnShow);
}

//-- 2006/10/20 Add
//-- 設定一圖示資料, 用來表示滑鼠點選電子地圖的位置
function setMapClickSymbol(strSymbolStr) {
    window.document.myFlash.SetVariable("gstrMapClickSymbol", strSymbolStr);
}

//-- 設定地圖影像存放目錄
function setMapImagePath(strImagePath) {
	window.document.myFlash.SetVariable("gMapImagePath", strImagePath);
}

//-- 設定圖資的專案名稱
function setMapProjectName(strProjectName) {
	window.document.myFlash.SetVariable("gProjectName", strProjectName);
}

//-- 設定要顯示的自定地標類別 (2006/11/01 Add)
function setMapShowCustomerSymbolClass(strClassNameStr) {
	window.document.myFlash.SetVariable("gShowCustomerSymbolClassName", strClassNameStr);
}

//-- 設定欲顯示的圖層名稱
function setMapShowLayerName(strShowLayerNameStr) {
	window.document.myFlash.SetVariable("gShowLayerNameStr", strShowLayerNameStr);
}

//-- 設定地圖影像的長寬大小(pixel)
function setMapSize(dblWidth, dblHeight) {
	window.document.myFlash.WIDTH = Number(dblWidth) + 4;	//Flash的寬度為地圖影像寬度+4
	window.document.myFlash.HEIGHT = Number(dblHeight) + 56;		//Flash的高度為地圖影像高度+6
	window.document.myFlash.SetVariable("gMAP_H", dblWidth);		//設定地圖影像的水平寬度
	window.document.myFlash.SetVariable("gMAP_V", dblHeight);		//設定地圖影像的垂直高度
}

//-- 設定作用中的主題圖名稱
function setMapThemeName(strThemeName) {
	window.document.myFlash.SetVariable("gThemeName", strThemeName);
}

//-- 設定隱藏(不顯示)的圖層名稱 
function setMapUnShowLayerName(strUnShowLayerNameStr) {
	window.document.myFlash.SetVariable("gUnShowLayerNameStr", strUnShowLayerNameStr);
}

//-- 2008/09/26 Add
//-- 設定電子地圖每 Pixel 所能允許的最大座標值
function setMaxCoordPerPixel(dblValue) {
	window.document.myFlash.SetVariable("gdblMaxCoordPerPixel", dblValue);
}

//-- 2008/09/26 Add
//-- 設定使用滑鼠滾輪作地圖放大時，滑鼠滾動的上限值
function setMaxMouseWheelCount(intCount) {
	window.document.myFlash.SetVariable("glngMaxMouseWheelCount", intCount);
}

//-- 2008/09/24 Add by Jimmy
//-- 設定使用滑鼠滾輪作地圖放大時的縮放比例
function setMouseWheelZoomInScale(intScale) {
    window.document.myFlash.SetVariable("gintMouseWheelZoomInScale", intScale);
}

//-- 2008/09/24 Add by Jimmy
//-- 設定使用滑鼠滾輪作地圖縮小時的縮放比例
function setMouseWheelZoomOutScale(intScale) {
    window.document.myFlash.SetVariable("gintMouseWheelZoomOutScale", intScale);
}

//-- 2008/09/15 Add by Jimmy
//-- 設定使用滑鼠滾輪作地圖縮放
function setUseMouseWheelToZoomMap(strMouseWheel) {
    window.document.myFlash.SetVariable("gUseMouseWheelToZoomMap", strMouseWheel);
}

//-- 設定當完成繪製圖形物件時，是否觸發 Draw_Finish() 事件
function setReturnDrawFinishEvents(blnDrawFinishEvents) {
	window.document.myFlash.SetVariable("gblnDrawFinishEvents", blnDrawFinishEvents);
}

//-- 2007/12/24 Add
//-- 設定當滑鼠點擊（Click）用 setInsertShowObject() 屬性所產生的動態插入物件圖示時，是否觸發 InsertShowObject_Click() 事件
function setReturnInsertShowObjectClickEvents(intTriggerEvents) {
    window.document.myFlash.SetVariable("gReturnInsertShowObjectClickEvents", intTriggerEvents);
}

//-- 設定當載入地圖影像時，是否觸發 Map_LoadMap() 事件
function setReturnLoadMapEvents(blnLoadMapEvents) {
	window.document.myFlash.SetVariable("gblnLoadMapEvents", blnLoadMapEvents);
}

//-- 2006/10/20 Add
//-- 設定當使用滑鼠單擊（Click）地圖影像時，是否觸發 Map_Click() 事件
function setReturnMapClickEvents(intMapClickEvents) {
    window.document.myFlash.SetVariable("gintMapClickEvents", intMapClickEvents);
}

//-- 2007/12/24 Add
//-- 設定當使用 iMapTrackPlay() 方法或是 iMapTrackReplay() 方法開始播放軌跡時，是否觸發 InsertShowObject_PlayTrack() 事件
function setReturnTrackPlayEvents(intTriggerEvents) {
    window.document.myFlash.SetVariable("gReturnTrackPlayEvents", intTriggerEvents);
}

//-- 2007/12/07 Add
//-- 設定輸出地圖影像的模式, 1=輸出全部的內容, 2=只輸出地圖, 預設為1
function setExportImageMode(strExportMode) {
    window.document.myFlash.SetVariable("gstrExportImageMode", strExportMode);
}

//-- 設定可查詢物件的圖層名稱
function setSelectableLayerName(strSelectableLayer) {
	window.document.myFlash.SetVariable("gSelectableLayerName", strSelectableLayer);
}

//-- 2006/11/23 Add
//-- 設定要顯示輔助說明文字的圖層名稱 
function setShowAltLayerNames(strLayerNames) {
    window.document.myFlash.SetVariable("gShowAltLayerStr", strLayerNames);
}

//-- 2006/10/22 Add
//-- 設定顯示自訂地標物件
function setShowCustomerSymbol(strShow) {
    window.document.myFlash.SetVariable("gShowCustomerSymbol", strShow);
}

//-- 2006/11/23 Add
//-- 設定是否要顯示指定圖層物件的輔助說明文字
function setShowLayerObjectAlt(strShow) {
    window.document.myFlash.SetVariable("gShowLayerObjectAlt", strShow);
}

//-- 2008/06/30 Add
//-- 設定取得圖層物件的輔助說明文字的回呼函式名稱
function setShowLayerObjectAltFuncName(strFuncName) {
    window.document.myFlash.SetVariable("gFuncName_LayerObjectAlt", strFuncName);
}

//-- 2007/12/24 Add
//-- 設定狀態列要顯示的 Html 
function setStatusInfoHtml(strHtml) {
    window.document.myFlash.SetVariable("gstrStatusInfoHtml", strHtml);
}

//-- 2007/12/21 Add
//-- 設定狀態列要顯示的文字
function setStatusInfoText(strText) {
    window.document.myFlash.SetVariable("gstrStatusInfoText", strText);
}

//-- 設定動態插入物件軌跡的線條顏色
function setTrackLineColor(lngTrackLineColor) {
	window.document.myFlash.SetVariable("gTrackLineColor", lngTrackLineColor);
}

//-- 設定動態插入物件軌跡的線條寬度
function setTrackLineWidth(intTrackLineWidth) {
	window.document.myFlash.SetVariable("gTrackLineWidth", intTrackLineWidth);
}

//-- 設定播放軌跡速度, 單位為秒
function setTrackPlayTimer(dblTimer) {
	window.document.myFlash.SetVariable("gTrackPlayTimer", dblTimer);
}

//-- 設定應用程式網址
function setWebPagePath(strWebPagePath) {
	window.document.myFlash.SetVariable("gWebPagePath", strWebPagePath);
}

//-- 設定當iMap電子地圖處於繪製圓形操作模式下時，所顯示的提示文字
function setWordDrawCircle(strWord) {
	window.document.myFlash.SetVariable("gWordDrawCircle", strWord);
}
//-- 設定繪製圓形功能輔助說明文字
function setWordDrawCircleOperationDesc(strWord) {
	window.document.myFlash.SetVariable("gWordDrawCircleOperationDesc", strWord);
}

//-- 設定當iMap電子地圖處於繪製橢圓形操作模式下時，所顯示的提示文字
function setWordDrawOvality(strWord) {
	window.document.myFlash.SetVariable("gWordDrawOvality", strWord);
}
//-- 設定繪製橢圓形功能輔助說明文字
function setWordDrawOvalityOperationDesc(strWord) {
	window.document.myFlash.SetVariable("gWordDrawOvalityOperationDesc", strWord);
}

//-- 設定當iMap電子地圖處於繪製固定圓形操作模式下時，所顯示的提示文字
function setWordDrawFixedCircle(strWord) {
	window.document.myFlash.SetVariable("gWordDrawFixedCircle", strWord);
}
//-- 設定繪製固定圓形功能輔助說明文字
function setWordDrawFixedCircleOperationDesc(strWord) {
	window.document.myFlash.SetVariable("gWordDrawFixedCircleOperationDesc", strWord);
}

//-- 設定當iMap電子地圖處於繪製矩形操作模式下時，所顯示的提示文字
function setWordDrawRectangle(strWord) {
	window.document.myFlash.SetVariable("gWordDrawRectangle", strWord);
}
//-- 設定繪製矩形功能輔助說明文字
function setWordDrawRectangleOperationDesc(strWord) {
	window.document.myFlash.SetVariable("gWordDrawRectangleOperationDesc", strWord);
}

//-- 設定當iMap電子地圖處於繪製折線操作模式下時，所顯示的提示文字
function setWordDrawPolyline(strWord) {
	window.document.myFlash.SetVariable("gWordDrawPolyline", strWord);
}
//-- 設定繪製折線功能輔助說明文字
function setWordDrawPolylineOperationDesc(strWord) {
	window.document.myFlash.SetVariable("gWordDrawPolylineOperationDesc", strWord);
}

//-- 設定當iMap電子地圖處於繪製多邊形操作模式下時，所顯示的提示文字
function setWordDrawPolygon(strWord) {
	window.document.myFlash.SetVariable("gWordDrawPolygon", strWord);
}
//-- 設定繪製多邊形功能輔助說明文字
function setWordDrawPolygonOperationDesc(strWord) {
	window.document.myFlash.SetVariable("gWordDrawPolygonOperationDesc", strWord);
}

//-- 設定當iMap電子地圖處於地圖放大操作模式下時，所顯示的提示文字
function setWordMapZoomIn(strWord) {
	window.document.myFlash.SetVariable("gWordMapZoomIn", strWord);
}
//-- 設定地圖放大功能輔助說明文字
function setWordMapZoomInOperationDesc(strWord) {
	window.document.myFlash.SetVariable("gWordMapZoomInOperationDesc", strWord);
}

//-- 設定當iMap電子地圖處於地圖縮小操作模式下時，所顯示的提示文字
function setWordMapZoomOut(strWord) {
	window.document.myFlash.SetVariable("gWordMapZoomOut", strWord);
}
//-- 設定地圖縮小功能輔助說明文字
function setWordMapZoomOutOperationDesc(strWord) {
	window.document.myFlash.SetVariable("gWordMapZoomOutOperationDesc", strWord);
}

//-- 設定當iMap電子地圖處於地圖平移操作模式下時，所顯示的提示文字
function setWordMapPan(strWord) {
	window.document.myFlash.SetVariable("gWordMapPan", strWord);
}
//-- 設定地圖平移功能輔助說明文字
function setWordMapPanOperationDesc(strWord) {
	window.document.myFlash.SetVariable("gWordMapPanOperationDesc", strWord);
}

//-- 設定當iMap電子地圖處於選取放大範圍操作模式下時，所顯示的提示文字
function setWordMapSelection(strWord) {
	window.document.myFlash.SetVariable("gWordMapSelection", strWord);
}
//-- 設定選取放大範圍功能輔助說明文字
function setWordMapSelectionOperationDesc(strWord) {
	window.document.myFlash.SetVariable("gWordMapSelectionOperationDesc", strWord);
}

//-- 設定當iMap電子地圖處於距離量測操作模式下時，所顯示的提示文字
function setWordMapDistance(strWord) {
	window.document.myFlash.SetVariable("gWordMapDistance", strWord);
}
//-- 設定距離量測功能輔助說明文字
function setWordMapDistanceOperationDesc(strWord) {
	window.document.myFlash.SetVariable("gWordMapDistanceOperationDesc", strWord);
}

//-- 設定當iMap電子地圖處於圈選位置操作模式下時，所顯示的提示文字
function setWordMapPosRange(strWord) {
	window.document.myFlash.SetVariable("gWordMapPosRange", strWord);
}
//-- 設定圈選位置功能輔助說明文字
function setWordMapPosRangeOperationDesc(strWord) {
	window.document.myFlash.SetVariable("gWordMapPosRangeOperationDesc", strWord);
}

//-- 設定當iMap電子地圖處於屬性查詢操作模式下時，所顯示的提示文字
function setWordMapInformation(strWord) {
	window.document.myFlash.SetVariable("gWordMapInformation", strWord);
}
//--  設定屬性查詢功能輔助說明文字
function setWordMapInformationOperationDesc(strWord) {
	window.document.myFlash.SetVariable("gWordMapInformationOperationDesc", strWord);
}
//-->