Browse Source

git-svn-id: https://192.168.57.71/svn/jsgkj@17 931142cf-59ea-a443-aa0e-51397b428577

xt_yuanxd 9 years ago
parent
commit
16e00aed35
100 changed files with 9907 additions and 0 deletions
  1. 24 0
      gkaq/gis-flex/trunk/.actionScriptProperties
  2. 2 0
      gkaq/gis-flex/trunk/.flexProperties
  3. 25 0
      gkaq/gis-flex/trunk/.project
  4. 2 0
      gkaq/gis-flex/trunk/.settings/org.eclipse.core.resources.prefs
  5. 6 0
      gkaq/gis-flex/trunk/html-template/history/history.css
  6. 678 0
      gkaq/gis-flex/trunk/html-template/history/history.js
  7. 29 0
      gkaq/gis-flex/trunk/html-template/history/historyFrame.html
  8. 108 0
      gkaq/gis-flex/trunk/html-template/index.template.html
  9. BIN
      gkaq/gis-flex/trunk/html-template/playerProductInstall.swf
  10. 777 0
      gkaq/gis-flex/trunk/html-template/swfobject.js
  11. BIN
      gkaq/gis-flex/trunk/libs/Cairngorm.swc
  12. BIN
      gkaq/gis-flex/trunk/libs/FlexBevLib.swc
  13. BIN
      gkaq/gis-flex/trunk/libs/LegendTree.swc
  14. BIN
      gkaq/gis-flex/trunk/libs/SuperMap.Web-7.0.1-11327.swc
  15. BIN
      gkaq/gis-flex/trunk/libs/SuperMap.Web.Gear-7.0.1-11327.swc
  16. BIN
      gkaq/gis-flex/trunk/libs/SuperMap.Web.iServerJava7C-7.0.1-11327.swc
  17. 107 0
      gkaq/gis-flex/trunk/locale/zh_CN/select.properties
  18. 393 0
      gkaq/gis-flex/trunk/src/Main.mxml
  19. 17 0
      gkaq/gis-flex/trunk/src/QueryLayerEvent.as
  20. 182 0
      gkaq/gis-flex/trunk/src/com/common/ConfigUtil.as
  21. 68 0
      gkaq/gis-flex/trunk/src/com/common/ConstUtil.as
  22. 229 0
      gkaq/gis-flex/trunk/src/com/config/MapConfig.xml
  23. 21 0
      gkaq/gis-flex/trunk/src/com/config/MenuConfig.xml
  24. 31 0
      gkaq/gis-flex/trunk/src/com/events/DataConfigEvent.as
  25. 19 0
      gkaq/gis-flex/trunk/src/com/events/MenusEvent.as
  26. 79 0
      gkaq/gis-flex/trunk/src/com/main/MapOperateModel.mxml
  27. 202 0
      gkaq/gis-flex/trunk/src/com/main/bufferAnalyst.as
  28. 248 0
      gkaq/gis-flex/trunk/src/com/main/infoWindowHandle.as
  29. 200 0
      gkaq/gis-flex/trunk/src/com/main/show.as
  30. 126 0
      gkaq/gis-flex/trunk/src/com/server/QueryAction.as
  31. 9 0
      gkaq/gis-flex/trunk/src/com/server/Service.mxml
  32. 74 0
      gkaq/gis-flex/trunk/src/com/server/XMLDecoder.as
  33. 238 0
      gkaq/gis-flex/trunk/src/com/skins/ButtonRectImgSkin.mxml
  34. 113 0
      gkaq/gis-flex/trunk/src/com/skins/ButtonSkin.mxml
  35. 223 0
      gkaq/gis-flex/trunk/src/com/skins/ComboBoxButtonSkin.mxml
  36. 247 0
      gkaq/gis-flex/trunk/src/com/skins/DateTimeInputSkin.mxml
  37. 36 0
      gkaq/gis-flex/trunk/src/com/skins/SkinnableContainerSkin.mxml
  38. 255 0
      gkaq/gis-flex/trunk/src/com/skins/TextInputSkin.mxml
  39. 299 0
      gkaq/gis-flex/trunk/src/com/skins/TitleWinSkin.mxml
  40. 112 0
      gkaq/gis-flex/trunk/src/com/skins/TitleWindowCloseButtonSkin.mxml
  41. 27 0
      gkaq/gis-flex/trunk/src/com/utils/AnyResponse.as
  42. 99 0
      gkaq/gis-flex/trunk/src/com/utils/CommonUtility.as
  43. 27 0
      gkaq/gis-flex/trunk/src/com/utils/ServicesUtility.as
  44. 63 0
      gkaq/gis-flex/trunk/src/com/view/AqtcWindow.mxml
  45. 113 0
      gkaq/gis-flex/trunk/src/com/view/Bw.mxml
  46. 143 0
      gkaq/gis-flex/trunk/src/com/view/Ccss.mxml
  47. 131 0
      gkaq/gis-flex/trunk/src/com/view/Cg.mxml
  48. 25 0
      gkaq/gis-flex/trunk/src/com/view/CodeVo.as
  49. 178 0
      gkaq/gis-flex/trunk/src/com/view/DataGridColumn.as
  50. 187 0
      gkaq/gis-flex/trunk/src/com/view/ExpertWindow.mxml
  51. 40 0
      gkaq/gis-flex/trunk/src/com/view/LinkButtonRenderer.mxml
  52. 38 0
      gkaq/gis-flex/trunk/src/com/view/PopImage.mxml
  53. 26 0
      gkaq/gis-flex/trunk/src/com/view/QskGrid.mxml
  54. 189 0
      gkaq/gis-flex/trunk/src/com/view/Selector.as
  55. 259 0
      gkaq/gis-flex/trunk/src/com/view/TreeItemLinesRenderer.as
  56. 22 0
      gkaq/gis-flex/trunk/src/com/view/TreeWithLines.as
  57. 34 0
      gkaq/gis-flex/trunk/src/com/view/TypeBase.as
  58. 24 0
      gkaq/gis-flex/trunk/src/com/view/VideoTitleWindow.mxml
  59. 145 0
      gkaq/gis-flex/trunk/src/com/view/Whqy.mxml
  60. 73 0
      gkaq/gis-flex/trunk/src/com/view/Yjwl.mxml
  61. 30 0
      gkaq/gis-flex/trunk/src/com/view/YjwzGrid.mxml
  62. 57 0
      gkaq/gis-flex/trunk/src/com/view/YjwzWindow.mxml
  63. 115 0
      gkaq/gis-flex/trunk/src/com/view/YjyaViewWindow.mxml
  64. 387 0
      gkaq/gis-flex/trunk/src/com/view/detail/MapTools.mxml
  65. 135 0
      gkaq/gis-flex/trunk/src/com/view/detail/PointDetail.mxml
  66. 20 0
      gkaq/gis-flex/trunk/src/com/view/tjcx/ResourceNode.as
  67. 240 0
      gkaq/gis-flex/trunk/src/com/view/tjcx/TjcxWindow.mxml
  68. 122 0
      gkaq/gis-flex/trunk/src/com/view/tjcx/ZydwWindow.mxml
  69. 307 0
      gkaq/gis-flex/trunk/src/com/view/ui/DateTime.mxml
  70. 17 0
      gkaq/gis-flex/trunk/src/com/view/ui/QTextInput.as
  71. 42 0
      gkaq/gis-flex/trunk/src/com/view/ui/TextInput.as
  72. 305 0
      gkaq/gis-flex/trunk/src/com/view/yjcz/CxTitleWindow.mxml
  73. 93 0
      gkaq/gis-flex/trunk/src/com/view/yjcz/ImagesDataLoader.as
  74. 107 0
      gkaq/gis-flex/trunk/src/com/view/yjcz/ImagesInfo.as
  75. 305 0
      gkaq/gis-flex/trunk/src/com/view/yjcz/QtTitleWindow.mxml
  76. 305 0
      gkaq/gis-flex/trunk/src/com/view/yjcz/XzTitleWindow.mxml
  77. 298 0
      gkaq/gis-flex/trunk/src/com/view/yjcz/YjczWindow.mxml
  78. BIN
      gkaq/gis-flex/trunk/src/images/aqtc.png
  79. BIN
      gkaq/gis-flex/trunk/src/images/arrowLeft.png
  80. BIN
      gkaq/gis-flex/trunk/src/images/arrowRight.png
  81. BIN
      gkaq/gis-flex/trunk/src/images/map/clear1.png
  82. BIN
      gkaq/gis-flex/trunk/src/images/map/cxtj.png
  83. BIN
      gkaq/gis-flex/trunk/src/images/map/expert.png
  84. BIN
      gkaq/gis-flex/trunk/src/images/map/map.png
  85. BIN
      gkaq/gis-flex/trunk/src/images/map/pan.png
  86. BIN
      gkaq/gis-flex/trunk/src/images/map/satellite.png
  87. BIN
      gkaq/gis-flex/trunk/src/images/map/translation.png
  88. BIN
      gkaq/gis-flex/trunk/src/images/map/viewEntire.png
  89. BIN
      gkaq/gis-flex/trunk/src/images/map/yjcz.png
  90. BIN
      gkaq/gis-flex/trunk/src/images/map/zoomin.png
  91. BIN
      gkaq/gis-flex/trunk/src/images/map/zoomout.png
  92. BIN
      gkaq/gis-flex/trunk/src/images/maps32.png
  93. BIN
      gkaq/gis-flex/trunk/src/images/menu.jpg
  94. BIN
      gkaq/gis-flex/trunk/src/images/png/aq_bf.png
  95. BIN
      gkaq/gis-flex/trunk/src/images/png/aq_bw.png
  96. BIN
      gkaq/gis-flex/trunk/src/images/png/aq_expertMini.png
  97. BIN
      gkaq/gis-flex/trunk/src/images/png/aq_ga.png
  98. BIN
      gkaq/gis-flex/trunk/src/images/png/aq_gq.png
  99. BIN
      gkaq/gis-flex/trunk/src/images/png/aq_hb.png
  100. BIN
      gkaq/gis-flex/trunk/src/images/png/aq_jj.png

+ 24 - 0
gkaq/gis-flex/trunk/.actionScriptProperties

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<actionScriptProperties analytics="false" mainApplicationPath="Main.mxml" projectUUID="420eeac2-afa6-4d08-9849-177deccf832f" version="10">
+  <compiler additionalCompilerArguments="-services &quot;E:\gkyjpt\codes\yjpt\yjpt\WEB-INF\flex\services-config.xml&quot; -locale=en_US,zh_CN -source-path=./locale/{locale} -allow-source-path-overlap=true -keep-all-type-selectors=true" autoRSLOrdering="true" copyDependentFiles="true" flexSDK="Flex 4.6.0" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderLocation="E:/gkyjpt/codes/yjpt/gis" outputFolderPath="bin-debug" removeUnusedRSL="true" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+    <compilerSourcePath/>
+    <libraryPath defaultLinkType="1">
+      <libraryPathEntry kind="4" path="">
+        <excludedEntries>
+          <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+          <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/core.swc" useDefaultLinkType="false"/>
+        </excludedEntries>
+      </libraryPathEntry>
+      <libraryPathEntry kind="1" linkType="1" path="libs"/>
+    </libraryPath>
+    <sourceAttachmentPath/>
+  </compiler>
+  <applications>
+    <application path="Main.mxml"/>
+  </applications>
+  <modules>
+    <module application="src/Main.mxml" destPath="com/main/MapOperateModel.swf" optimize="true" sourcePath="src/com/main/MapOperateModel.mxml"/>
+  </modules>
+  <buildCSSFiles/>
+  <flashCatalyst validateFlashCatalystCompatibility="false"/>
+</actionScriptProperties>

+ 2 - 0
gkaq/gis-flex/trunk/.flexProperties

@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flexProperties enableServiceManager="false" flexServerFeatures="4" flexServerType="2" serverContextRoot="/yjpt" serverRoot="E:/gkyjpt/codes/yjpt/yjpt" serverRootURL="http://localhost:8080/yjpt" toolCompile="true" useServerFlexSDK="false" version="2"/>

+ 25 - 0
gkaq/gis-flex/trunk/.project

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>gis</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.adobe.flexbuilder.project.flexbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>com.adobe.flexbuilder.project.flexnature</nature>
+		<nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
+	</natures>
+	<linkedResources>
+		<link>
+			<name>bin-debug</name>
+			<type>2</type>
+			<location>E:/gkyjpt/codes/yjpt/gis</location>
+		</link>
+	</linkedResources>
+</projectDescription>

+ 2 - 0
gkaq/gis-flex/trunk/.settings/org.eclipse.core.resources.prefs

@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=utf-8

+ 6 - 0
gkaq/gis-flex/trunk/html-template/history/history.css

@@ -0,0 +1,6 @@
+/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
+
+#ie_historyFrame { width: 0px; height: 0px; display:none }
+#firefox_anchorDiv { width: 0px; height: 0px; display:none }
+#safari_formDiv { width: 0px; height: 0px; display:none }
+#safari_rememberDiv { width: 0px; height: 0px; display:none }

+ 678 - 0
gkaq/gis-flex/trunk/html-template/history/history.js

@@ -0,0 +1,678 @@
+BrowserHistoryUtils = {
+    addEvent: function(elm, evType, fn, useCapture) {
+        useCapture = useCapture || false;
+        if (elm.addEventListener) {
+            elm.addEventListener(evType, fn, useCapture);
+            return true;
+        }
+        else if (elm.attachEvent) {
+            var r = elm.attachEvent('on' + evType, fn);
+            return r;
+        }
+        else {
+            elm['on' + evType] = fn;
+        }
+    }
+}
+
+BrowserHistory = (function() {
+    // type of browser
+    var browser = {
+        ie: false, 
+        ie8: false, 
+        firefox: false, 
+        safari: false, 
+        opera: false, 
+        version: -1
+    };
+
+    // Default app state URL to use when no fragment ID present
+    var defaultHash = '';
+
+    // Last-known app state URL
+    var currentHref = document.location.href;
+
+    // Initial URL (used only by IE)
+    var initialHref = document.location.href;
+
+    // Initial URL (used only by IE)
+    var initialHash = document.location.hash;
+
+    // History frame source URL prefix (used only by IE)
+    var historyFrameSourcePrefix = 'history/historyFrame.html?';
+
+    // History maintenance (used only by Safari)
+    var currentHistoryLength = -1;
+    
+    // Flag to denote the existence of onhashchange
+    var browserHasHashChange = false;
+
+    var historyHash = [];
+
+    var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
+
+    var backStack = [];
+    var forwardStack = [];
+
+    var currentObjectId = null;
+
+    //UserAgent detection
+    var useragent = navigator.userAgent.toLowerCase();
+
+    if (useragent.indexOf("opera") != -1) {
+        browser.opera = true;
+    } else if (useragent.indexOf("msie") != -1) {
+        browser.ie = true;
+        browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
+        if (browser.version == 8)
+        {
+            browser.ie = false;
+            browser.ie8 = true;
+        }
+    } else if (useragent.indexOf("safari") != -1) {
+        browser.safari = true;
+        browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
+    } else if (useragent.indexOf("gecko") != -1) {
+        browser.firefox = true;
+    }
+
+    if (browser.ie == true && browser.version == 7) {
+        window["_ie_firstload"] = false;
+    }
+
+    function hashChangeHandler()
+    {
+        currentHref = document.location.href;
+        var flexAppUrl = getHash();
+        //ADR: to fix multiple
+        if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+            var pl = getPlayers();
+            for (var i = 0; i < pl.length; i++) {
+                pl[i].browserURLChange(flexAppUrl);
+            }
+        } else {
+            getPlayer().browserURLChange(flexAppUrl);
+        }
+    }
+
+    // Accessor functions for obtaining specific elements of the page.
+    function getHistoryFrame()
+    {
+        return document.getElementById('ie_historyFrame');
+    }
+
+    function getFormElement()
+    {
+        return document.getElementById('safari_formDiv');
+    }
+
+    function getRememberElement()
+    {
+        return document.getElementById("safari_remember_field");
+    }
+
+    // Get the Flash player object for performing ExternalInterface callbacks.
+    // Updated for changes to SWFObject2.
+    function getPlayer(id) {
+        var i;
+
+		if (id && document.getElementById(id)) {
+			var r = document.getElementById(id);
+			if (typeof r.SetVariable != "undefined") {
+				return r;
+			}
+			else {
+				var o = r.getElementsByTagName("object");
+				var e = r.getElementsByTagName("embed");
+                for (i = 0; i < o.length; i++) {
+                    if (typeof o[i].browserURLChange != "undefined")
+                        return o[i];
+                }
+                for (i = 0; i < e.length; i++) {
+                    if (typeof e[i].browserURLChange != "undefined")
+                        return e[i];
+                }
+			}
+		}
+		else {
+			var o = document.getElementsByTagName("object");
+			var e = document.getElementsByTagName("embed");
+            for (i = 0; i < e.length; i++) {
+                if (typeof e[i].browserURLChange != "undefined")
+                {
+                    return e[i];
+                }
+            }
+            for (i = 0; i < o.length; i++) {
+                if (typeof o[i].browserURLChange != "undefined")
+                {
+                    return o[i];
+                }
+            }
+		}
+		return undefined;
+	}
+    
+    function getPlayers() {
+        var i;
+        var players = [];
+        if (players.length == 0) {
+            var tmp = document.getElementsByTagName('object');
+            for (i = 0; i < tmp.length; i++)
+            {
+                if (typeof tmp[i].browserURLChange != "undefined")
+                    players.push(tmp[i]);
+            }
+        }
+        if (players.length == 0 || players[0].object == null) {
+            var tmp = document.getElementsByTagName('embed');
+            for (i = 0; i < tmp.length; i++)
+            {
+                if (typeof tmp[i].browserURLChange != "undefined")
+                    players.push(tmp[i]);
+            }
+        }
+        return players;
+    }
+
+	function getIframeHash() {
+		var doc = getHistoryFrame().contentWindow.document;
+		var hash = String(doc.location.search);
+		if (hash.length == 1 && hash.charAt(0) == "?") {
+			hash = "";
+		}
+		else if (hash.length >= 2 && hash.charAt(0) == "?") {
+			hash = hash.substring(1);
+		}
+		return hash;
+	}
+
+    /* Get the current location hash excluding the '#' symbol. */
+    function getHash() {
+       // It would be nice if we could use document.location.hash here,
+       // but it's faulty sometimes.
+       var idx = document.location.href.indexOf('#');
+       return (idx >= 0) ? document.location.href.substr(idx+1) : '';
+    }
+
+    /* Get the current location hash excluding the '#' symbol. */
+    function setHash(hash) {
+       // It would be nice if we could use document.location.hash here,
+       // but it's faulty sometimes.
+       if (hash == '') hash = '#'
+       document.location.hash = hash;
+    }
+
+    function createState(baseUrl, newUrl, flexAppUrl) {
+        return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
+    }
+
+    /* Add a history entry to the browser.
+     *   baseUrl: the portion of the location prior to the '#'
+     *   newUrl: the entire new URL, including '#' and following fragment
+     *   flexAppUrl: the portion of the location following the '#' only
+     */
+    function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
+
+        //delete all the history entries
+        forwardStack = [];
+
+        if (browser.ie) {
+            //Check to see if we are being asked to do a navigate for the first
+            //history entry, and if so ignore, because it's coming from the creation
+            //of the history iframe
+            if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
+                currentHref = initialHref;
+                return;
+            }
+            if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
+                newUrl = baseUrl + '#' + defaultHash;
+                flexAppUrl = defaultHash;
+            } else {
+                // for IE, tell the history frame to go somewhere without a '#'
+                // in order to get this entry into the browser history.
+                getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
+            }
+            setHash(flexAppUrl);
+        } else {
+
+            //ADR
+            if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
+                initialState = createState(baseUrl, newUrl, flexAppUrl);
+            } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
+                backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
+            }
+
+            if (browser.safari && !browserHasHashChange) {
+                // for Safari, submit a form whose action points to the desired URL
+                if (browser.version <= 419.3) {
+                    var file = window.location.pathname.toString();
+                    file = file.substring(file.lastIndexOf("/")+1);
+                    getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
+                    //get the current elements and add them to the form
+                    var qs = window.location.search.substring(1);
+                    var qs_arr = qs.split("&");
+                    for (var i = 0; i < qs_arr.length; i++) {
+                        var tmp = qs_arr[i].split("=");
+                        var elem = document.createElement("input");
+                        elem.type = "hidden";
+                        elem.name = tmp[0];
+                        elem.value = tmp[1];
+                        document.forms.historyForm.appendChild(elem);
+                    }
+                    document.forms.historyForm.submit();
+                } else {
+                    top.location.hash = flexAppUrl;
+                }
+                // We also have to maintain the history by hand for Safari
+                historyHash[history.length] = flexAppUrl;
+                _storeStates();
+            } else {
+                // Otherwise, just tell the browser to go there
+                setHash(flexAppUrl);
+            }
+        }
+        backStack.push(createState(baseUrl, newUrl, flexAppUrl));
+    }
+
+    function _storeStates() {
+        if (browser.safari) {
+            getRememberElement().value = historyHash.join(",");
+        }
+    }
+
+    function handleBackButton() {
+        //The "current" page is always at the top of the history stack.
+        var current = backStack.pop();
+        if (!current) { return; }
+        var last = backStack[backStack.length - 1];
+        if (!last && backStack.length == 0){
+            last = initialState;
+        }
+        forwardStack.push(current);
+    }
+
+    function handleForwardButton() {
+        //summary: private method. Do not call this directly.
+
+        var last = forwardStack.pop();
+        if (!last) { return; }
+        backStack.push(last);
+    }
+
+    function handleArbitraryUrl() {
+        //delete all the history entries
+        forwardStack = [];
+    }
+
+    /* Called periodically to poll to see if we need to detect navigation that has occurred */
+    function checkForUrlChange() {
+
+        if (browser.ie) {
+            if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
+                //This occurs when the user has navigated to a specific URL
+                //within the app, and didn't use browser back/forward
+                //IE seems to have a bug where it stops updating the URL it
+                //shows the end-user at this point, but programatically it
+                //appears to be correct.  Do a full app reload to get around
+                //this issue.
+                if (browser.version < 7) {
+                    currentHref = document.location.href;
+                    document.location.reload();
+                } else {
+					if (getHash() != getIframeHash()) {
+						// this.iframe.src = this.blankURL + hash;
+						var sourceToSet = historyFrameSourcePrefix + getHash();
+						getHistoryFrame().src = sourceToSet;
+                        currentHref = document.location.href;
+					}
+                }
+            }
+        }
+
+        if (browser.safari && !browserHasHashChange) {
+            // For Safari, we have to check to see if history.length changed.
+            if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
+                //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
+                var flexAppUrl = getHash();
+                if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
+                {    
+                    // If it did change and we're running Safari 3.x or earlier, 
+                    // then we have to look the old state up in our hand-maintained 
+                    // array since document.location.hash won't have changed, 
+                    // then call back into BrowserManager.
+                currentHistoryLength = history.length;
+                    flexAppUrl = historyHash[currentHistoryLength];
+                }
+
+                //ADR: to fix multiple
+                if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+                    var pl = getPlayers();
+                    for (var i = 0; i < pl.length; i++) {
+                        pl[i].browserURLChange(flexAppUrl);
+                    }
+                } else {
+                    getPlayer().browserURLChange(flexAppUrl);
+                }
+                _storeStates();
+            }
+        }
+        if (browser.firefox && !browserHasHashChange) {
+            if (currentHref != document.location.href) {
+                var bsl = backStack.length;
+
+                var urlActions = {
+                    back: false, 
+                    forward: false, 
+                    set: false
+                }
+
+                if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
+                    urlActions.back = true;
+                    // FIXME: could this ever be a forward button?
+                    // we can't clear it because we still need to check for forwards. Ugg.
+                    // clearInterval(this.locationTimer);
+                    handleBackButton();
+                }
+                
+                // first check to see if we could have gone forward. We always halt on
+                // a no-hash item.
+                if (forwardStack.length > 0) {
+                    if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
+                        urlActions.forward = true;
+                        handleForwardButton();
+                    }
+                }
+
+                // ok, that didn't work, try someplace back in the history stack
+                if ((bsl >= 2) && (backStack[bsl - 2])) {
+                    if (backStack[bsl - 2].flexAppUrl == getHash()) {
+                        urlActions.back = true;
+                        handleBackButton();
+                    }
+                }
+                
+                if (!urlActions.back && !urlActions.forward) {
+                    var foundInStacks = {
+                        back: -1, 
+                        forward: -1
+                    }
+
+                    for (var i = 0; i < backStack.length; i++) {
+                        if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+                            arbitraryUrl = true;
+                            foundInStacks.back = i;
+                        }
+                    }
+                    for (var i = 0; i < forwardStack.length; i++) {
+                        if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+                            arbitraryUrl = true;
+                            foundInStacks.forward = i;
+                        }
+                    }
+                    handleArbitraryUrl();
+                }
+
+                // Firefox changed; do a callback into BrowserManager to tell it.
+                currentHref = document.location.href;
+                var flexAppUrl = getHash();
+                //ADR: to fix multiple
+                if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+                    var pl = getPlayers();
+                    for (var i = 0; i < pl.length; i++) {
+                        pl[i].browserURLChange(flexAppUrl);
+                    }
+                } else {
+                    getPlayer().browserURLChange(flexAppUrl);
+                }
+            }
+        }
+    }
+
+    var _initialize = function () {
+        
+        browserHasHashChange = ("onhashchange" in document.body);
+        
+        if (browser.ie)
+        {
+            var scripts = document.getElementsByTagName('script');
+            for (var i = 0, s; s = scripts[i]; i++) {
+                if (s.src.indexOf("history.js") > -1) {
+                    var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
+                }
+            }
+            historyFrameSourcePrefix = iframe_location + "?";
+            var src = historyFrameSourcePrefix;
+
+            var iframe = document.createElement("iframe");
+            iframe.id = 'ie_historyFrame';
+            iframe.name = 'ie_historyFrame';
+            iframe.src = 'javascript:false;'; 
+
+            try {
+                document.body.appendChild(iframe);
+            } catch(e) {
+                setTimeout(function() {
+                    document.body.appendChild(iframe);
+                }, 0);
+            }
+        }
+
+        if (browser.safari && !browserHasHashChange)
+        {
+            var rememberDiv = document.createElement("div");
+            rememberDiv.id = 'safari_rememberDiv';
+            document.body.appendChild(rememberDiv);
+            rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
+
+            var formDiv = document.createElement("div");
+            formDiv.id = 'safari_formDiv';
+            document.body.appendChild(formDiv);
+
+            var reloader_content = document.createElement('div');
+            reloader_content.id = 'safarireloader';
+            var scripts = document.getElementsByTagName('script');
+            for (var i = 0, s; s = scripts[i]; i++) {
+                if (s.src.indexOf("history.js") > -1) {
+                    html = (new String(s.src)).replace(".js", ".html");
+                }
+            }
+            reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
+            document.body.appendChild(reloader_content);
+            reloader_content.style.position = 'absolute';
+            reloader_content.style.left = reloader_content.style.top = '-9999px';
+            iframe = reloader_content.getElementsByTagName('iframe')[0];
+
+            if (document.getElementById("safari_remember_field").value != "" ) {
+                historyHash = document.getElementById("safari_remember_field").value.split(",");
+            }
+        }
+
+        if (browserHasHashChange)        
+            document.body.onhashchange = hashChangeHandler;
+    }
+
+    return {
+        historyHash: historyHash, 
+        backStack: function() { return backStack; }, 
+        forwardStack: function() { return forwardStack }, 
+        getPlayer: getPlayer, 
+        initialize: function(src) {
+            _initialize(src);
+        }, 
+        setURL: function(url) {
+            document.location.href = url;
+        }, 
+        getURL: function() {
+            return document.location.href;
+        }, 
+        getTitle: function() {
+            return document.title;
+        }, 
+        setTitle: function(title) {
+            try {
+                backStack[backStack.length - 1].title = title;
+            } catch(e) { }
+            //if on safari, set the title to be the empty string. 
+            if (browser.safari) {
+                if (title == "") {
+                    try {
+                    var tmp = window.location.href.toString();
+                    title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
+                    } catch(e) {
+                        title = "";
+                    }
+                }
+            }
+            document.title = title;
+        }, 
+        setDefaultURL: function(def)
+        {
+            defaultHash = def;
+            def = getHash();
+            //trailing ? is important else an extra frame gets added to the history
+            //when navigating back to the first page.  Alternatively could check
+            //in history frame navigation to compare # and ?.
+            if (browser.ie)
+            {
+                window['_ie_firstload'] = true;
+                var sourceToSet = historyFrameSourcePrefix + def;
+                var func = function() {
+                    getHistoryFrame().src = sourceToSet;
+                    window.location.replace("#" + def);
+                    setInterval(checkForUrlChange, 50);
+                }
+                try {
+                    func();
+                } catch(e) {
+                    window.setTimeout(function() { func(); }, 0);
+                }
+            }
+
+            if (browser.safari)
+            {
+                currentHistoryLength = history.length;
+                if (historyHash.length == 0) {
+                    historyHash[currentHistoryLength] = def;
+                    var newloc = "#" + def;
+                    window.location.replace(newloc);
+                } else {
+                    //alert(historyHash[historyHash.length-1]);
+                }
+                setInterval(checkForUrlChange, 50);
+            }
+            
+            
+            if (browser.firefox || browser.opera)
+            {
+                var reg = new RegExp("#" + def + "$");
+                if (window.location.toString().match(reg)) {
+                } else {
+                    var newloc ="#" + def;
+                    window.location.replace(newloc);
+                }
+                setInterval(checkForUrlChange, 50);
+            }
+
+        }, 
+
+        /* Set the current browser URL; called from inside BrowserManager to propagate
+         * the application state out to the container.
+         */
+        setBrowserURL: function(flexAppUrl, objectId) {
+            if (browser.ie && typeof objectId != "undefined") {
+                currentObjectId = objectId;
+            }
+           //fromIframe = fromIframe || false;
+           //fromFlex = fromFlex || false;
+           //alert("setBrowserURL: " + flexAppUrl);
+           //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
+
+           var pos = document.location.href.indexOf('#');
+           var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
+           var newUrl = baseUrl + '#' + flexAppUrl;
+
+           if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
+               currentHref = newUrl;
+               addHistoryEntry(baseUrl, newUrl, flexAppUrl);
+               currentHistoryLength = history.length;
+           }
+        }, 
+
+        browserURLChange: function(flexAppUrl) {
+            var objectId = null;
+            if (browser.ie && currentObjectId != null) {
+                objectId = currentObjectId;
+            }
+            
+            if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+                var pl = getPlayers();
+                for (var i = 0; i < pl.length; i++) {
+                    try {
+                        pl[i].browserURLChange(flexAppUrl);
+                    } catch(e) { }
+                }
+            } else {
+                try {
+                    getPlayer(objectId).browserURLChange(flexAppUrl);
+                } catch(e) { }
+            }
+
+            currentObjectId = null;
+        },
+        getUserAgent: function() {
+            return navigator.userAgent;
+        },
+        getPlatform: function() {
+            return navigator.platform;
+        }
+
+    }
+
+})();
+
+// Initialization
+
+// Automated unit testing and other diagnostics
+
+function setURL(url)
+{
+    document.location.href = url;
+}
+
+function backButton()
+{
+    history.back();
+}
+
+function forwardButton()
+{
+    history.forward();
+}
+
+function goForwardOrBackInHistory(step)
+{
+    history.go(step);
+}
+
+//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
+(function(i) {
+    var u =navigator.userAgent;var e=/*@cc_on!@*/false; 
+    var st = setTimeout;
+    if(/webkit/i.test(u)){
+        st(function(){
+            var dr=document.readyState;
+            if(dr=="loaded"||dr=="complete"){i()}
+            else{st(arguments.callee,10);}},10);
+    } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
+        document.addEventListener("DOMContentLoaded",i,false);
+    } else if(e){
+    (function(){
+        var t=document.createElement('doc:rdy');
+        try{t.doScroll('left');
+            i();t=null;
+        }catch(e){st(arguments.callee,0);}})();
+    } else{
+        window.onload=i;
+    }
+})( function() {BrowserHistory.initialize();} );

+ 29 - 0
gkaq/gis-flex/trunk/html-template/history/historyFrame.html

@@ -0,0 +1,29 @@
+<html>
+    <head>
+        <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
+        <META HTTP-EQUIV="Expires" CONTENT="-1"> 
+    </head>
+    <body>
+    <script>
+        function processUrl()
+        {
+
+            var pos = url.indexOf("?");
+            url = pos != -1 ? url.substr(pos + 1) : "";
+            if (!parent._ie_firstload) {
+                parent.BrowserHistory.setBrowserURL(url);
+                try {
+                    parent.BrowserHistory.browserURLChange(url);
+                } catch(e) { }
+            } else {
+                parent._ie_firstload = false;
+            }
+        }
+
+        var url = document.location.href;
+        processUrl();
+        document.write(encodeURIComponent(url));
+    </script>
+    Hidden frame for Browser History support.
+    </body>
+</html>

+ 108 - 0
gkaq/gis-flex/trunk/html-template/index.template.html

@@ -0,0 +1,108 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> 
+    <!-- 
+    Smart developers always View Source. 
+    
+    This application was built using Adobe Flex, an open source framework
+    for building rich Internet applications that get delivered via the
+    Flash Player or to desktops via Adobe AIR. 
+    
+    Learn more about Flex at http://flex.org 
+    // -->
+    <head>
+        <title>${title}</title>
+        <meta name="google" value="notranslate" />         
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+        <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and 
+             the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as 
+             the percentage of the height of its parent container, which has to be set explicitly.  Fix for
+             Firefox 3.6 focus border issues.  Initially, don't display flashContent div so it won't show 
+             if JavaScript disabled.
+        -->
+        <style type="text/css" media="screen"> 
+            html, body  { height:100%; }
+            body { margin:0; padding:0; overflow:auto; text-align:center; 
+                   background-color: ${bgcolor}; }   
+            object:focus { outline:none; }
+            #flashContent { display:none; }
+        </style>
+        
+        <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+        <!-- BEGIN Browser History required section ${useBrowserHistory}>
+        <link rel="stylesheet" type="text/css" href="history/history.css" />
+        <script type="text/javascript" src="history/history.js"></script>
+        <!${useBrowserHistory} END Browser History required section -->  
+            
+        <script type="text/javascript" src="swfobject.js"></script>
+        <script type="text/javascript">
+            // For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. 
+            var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+            // To use express install, set to playerProductInstall.swf, otherwise the empty string. 
+            var xiSwfUrlStr = "${expressInstallSwf}";
+            var flashvars = {};
+            var params = {};
+            params.quality = "high";
+            params.bgcolor = "${bgcolor}";
+            params.allowscriptaccess = "sameDomain";
+            params.allowfullscreen = "true";
+            var attributes = {};
+            attributes.id = "${application}";
+            attributes.name = "${application}";
+            attributes.align = "middle";
+            swfobject.embedSWF(
+                "${swf}.swf", "flashContent", 
+                "${width}", "${height}", 
+                swfVersionStr, xiSwfUrlStr, 
+                flashvars, params, attributes);
+            // JavaScript enabled so display the flashContent div in case it is not replaced with a swf object.
+            swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+        </script>
+    </head>
+    <body>
+        <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough 
+             JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+             when JavaScript is disabled.
+        -->
+        <div id="flashContent">
+            <p>
+                To view this page ensure that Adobe Flash Player version 
+                ${version_major}.${version_minor}.${version_revision} or greater is installed. 
+            </p>
+            <script type="text/javascript"> 
+                var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://"); 
+                document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='" 
+                                + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" ); 
+            </script> 
+        </div>
+        
+        <noscript>
+            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+                <param name="movie" value="${swf}.swf" />
+                <param name="quality" value="high" />
+                <param name="bgcolor" value="${bgcolor}" />
+                <param name="allowScriptAccess" value="sameDomain" />
+                <param name="allowFullScreen" value="true" />
+                <!--[if !IE]>-->
+                <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+                    <param name="quality" value="high" />
+                    <param name="bgcolor" value="${bgcolor}" />
+                    <param name="allowScriptAccess" value="sameDomain" />
+                    <param name="allowFullScreen" value="true" />
+                <!--<![endif]-->
+                <!--[if gte IE 6]>-->
+                    <p> 
+                        Either scripts and active content are not permitted to run or Adobe Flash Player version
+                        ${version_major}.${version_minor}.${version_revision} or greater is not installed.
+                    </p>
+                <!--<![endif]-->
+                    <a href="http://www.adobe.com/go/getflashplayer">
+                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+                    </a>
+                <!--[if !IE]>-->
+                </object>
+                <!--<![endif]-->
+            </object>
+        </noscript>     
+   </body>
+</html>

BIN
gkaq/gis-flex/trunk/html-template/playerProductInstall.swf


+ 777 - 0
gkaq/gis-flex/trunk/html-template/swfobject.js

@@ -0,0 +1,777 @@
+/*!	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
+	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
+*/
+
+var swfobject = function() {
+	
+	var UNDEF = "undefined",
+		OBJECT = "object",
+		SHOCKWAVE_FLASH = "Shockwave Flash",
+		SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+		FLASH_MIME_TYPE = "application/x-shockwave-flash",
+		EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+		ON_READY_STATE_CHANGE = "onreadystatechange",
+		
+		win = window,
+		doc = document,
+		nav = navigator,
+		
+		plugin = false,
+		domLoadFnArr = [main],
+		regObjArr = [],
+		objIdArr = [],
+		listenersArr = [],
+		storedAltContent,
+		storedAltContentId,
+		storedCallbackFn,
+		storedCallbackObj,
+		isDomLoaded = false,
+		isExpressInstallActive = false,
+		dynamicStylesheet,
+		dynamicStylesheetMedia,
+		autoHideShow = true,
+	
+	/* Centralized function for browser feature detection
+		- User agent string detection is only used when no good alternative is possible
+		- Is executed directly for optimal performance
+	*/	
+	ua = function() {
+		var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+			u = nav.userAgent.toLowerCase(),
+			p = nav.platform.toLowerCase(),
+			windows = p ? /win/.test(p) : /win/.test(u),
+			mac = p ? /mac/.test(p) : /mac/.test(u),
+			webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+			ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+			playerVersion = [0,0,0],
+			d = null;
+		if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+			d = nav.plugins[SHOCKWAVE_FLASH].description;
+			if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+				plugin = true;
+				ie = false; // cascaded feature detection for Internet Explorer
+				d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+				playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+				playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+				playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+			}
+		}
+		else if (typeof win.ActiveXObject != UNDEF) {
+			try {
+				var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+				if (a) { // a will return null when ActiveX is disabled
+					d = a.GetVariable("$version");
+					if (d) {
+						ie = true; // cascaded feature detection for Internet Explorer
+						d = d.split(" ")[1].split(",");
+						playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+					}
+				}
+			}
+			catch(e) {}
+		}
+		return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+	}(),
+	
+	/* Cross-browser onDomLoad
+		- Will fire an event as soon as the DOM of a web page is loaded
+		- Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+		- Regular onload serves as fallback
+	*/ 
+	onDomLoad = function() {
+		if (!ua.w3) { return; }
+		if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically 
+			callDomLoadFunctions();
+		}
+		if (!isDomLoaded) {
+			if (typeof doc.addEventListener != UNDEF) {
+				doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+			}		
+			if (ua.ie && ua.win) {
+				doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+					if (doc.readyState == "complete") {
+						doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+						callDomLoadFunctions();
+					}
+				});
+				if (win == top) { // if not inside an iframe
+					(function(){
+						if (isDomLoaded) { return; }
+						try {
+							doc.documentElement.doScroll("left");
+						}
+						catch(e) {
+							setTimeout(arguments.callee, 0);
+							return;
+						}
+						callDomLoadFunctions();
+					})();
+				}
+			}
+			if (ua.wk) {
+				(function(){
+					if (isDomLoaded) { return; }
+					if (!/loaded|complete/.test(doc.readyState)) {
+						setTimeout(arguments.callee, 0);
+						return;
+					}
+					callDomLoadFunctions();
+				})();
+			}
+			addLoadEvent(callDomLoadFunctions);
+		}
+	}();
+	
+	function callDomLoadFunctions() {
+		if (isDomLoaded) { return; }
+		try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+			var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+			t.parentNode.removeChild(t);
+		}
+		catch (e) { return; }
+		isDomLoaded = true;
+		var dl = domLoadFnArr.length;
+		for (var i = 0; i < dl; i++) {
+			domLoadFnArr[i]();
+		}
+	}
+	
+	function addDomLoadEvent(fn) {
+		if (isDomLoaded) {
+			fn();
+		}
+		else { 
+			domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+		}
+	}
+	
+	/* Cross-browser onload
+		- Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+		- Will fire an event as soon as a web page including all of its assets are loaded 
+	 */
+	function addLoadEvent(fn) {
+		if (typeof win.addEventListener != UNDEF) {
+			win.addEventListener("load", fn, false);
+		}
+		else if (typeof doc.addEventListener != UNDEF) {
+			doc.addEventListener("load", fn, false);
+		}
+		else if (typeof win.attachEvent != UNDEF) {
+			addListener(win, "onload", fn);
+		}
+		else if (typeof win.onload == "function") {
+			var fnOld = win.onload;
+			win.onload = function() {
+				fnOld();
+				fn();
+			};
+		}
+		else {
+			win.onload = fn;
+		}
+	}
+	
+	/* Main function
+		- Will preferably execute onDomLoad, otherwise onload (as a fallback)
+	*/
+	function main() { 
+		if (plugin) {
+			testPlayerVersion();
+		}
+		else {
+			matchVersions();
+		}
+	}
+	
+	/* Detect the Flash Player version for non-Internet Explorer browsers
+		- Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+		  a. Both release and build numbers can be detected
+		  b. Avoid wrong descriptions by corrupt installers provided by Adobe
+		  c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+		- Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+	*/
+	function testPlayerVersion() {
+		var b = doc.getElementsByTagName("body")[0];
+		var o = createElement(OBJECT);
+		o.setAttribute("type", FLASH_MIME_TYPE);
+		var t = b.appendChild(o);
+		if (t) {
+			var counter = 0;
+			(function(){
+				if (typeof t.GetVariable != UNDEF) {
+					var d = t.GetVariable("$version");
+					if (d) {
+						d = d.split(" ")[1].split(",");
+						ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+					}
+				}
+				else if (counter < 10) {
+					counter++;
+					setTimeout(arguments.callee, 10);
+					return;
+				}
+				b.removeChild(o);
+				t = null;
+				matchVersions();
+			})();
+		}
+		else {
+			matchVersions();
+		}
+	}
+	
+	/* Perform Flash Player and SWF version matching; static publishing only
+	*/
+	function matchVersions() {
+		var rl = regObjArr.length;
+		if (rl > 0) {
+			for (var i = 0; i < rl; i++) { // for each registered object element
+				var id = regObjArr[i].id;
+				var cb = regObjArr[i].callbackFn;
+				var cbObj = {success:false, id:id};
+				if (ua.pv[0] > 0) {
+					var obj = getElementById(id);
+					if (obj) {
+						if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+							setVisibility(id, true);
+							if (cb) {
+								cbObj.success = true;
+								cbObj.ref = getObjectById(id);
+								cb(cbObj);
+							}
+						}
+						else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+							var att = {};
+							att.data = regObjArr[i].expressInstall;
+							att.width = obj.getAttribute("width") || "0";
+							att.height = obj.getAttribute("height") || "0";
+							if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+							if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+							// parse HTML object param element's name-value pairs
+							var par = {};
+							var p = obj.getElementsByTagName("param");
+							var pl = p.length;
+							for (var j = 0; j < pl; j++) {
+								if (p[j].getAttribute("name").toLowerCase() != "movie") {
+									par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+								}
+							}
+							showExpressInstall(att, par, id, cb);
+						}
+						else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+							displayAltContent(obj);
+							if (cb) { cb(cbObj); }
+						}
+					}
+				}
+				else {	// if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+					setVisibility(id, true);
+					if (cb) {
+						var o = getObjectById(id); // test whether there is an HTML object element or not
+						if (o && typeof o.SetVariable != UNDEF) { 
+							cbObj.success = true;
+							cbObj.ref = o;
+						}
+						cb(cbObj);
+					}
+				}
+			}
+		}
+	}
+	
+	function getObjectById(objectIdStr) {
+		var r = null;
+		var o = getElementById(objectIdStr);
+		if (o && o.nodeName == "OBJECT") {
+			if (typeof o.SetVariable != UNDEF) {
+				r = o;
+			}
+			else {
+				var n = o.getElementsByTagName(OBJECT)[0];
+				if (n) {
+					r = n;
+				}
+			}
+		}
+		return r;
+	}
+	
+	/* Requirements for Adobe Express Install
+		- only one instance can be active at a time
+		- fp 6.0.65 or higher
+		- Win/Mac OS only
+		- no Webkit engines older than version 312
+	*/
+	function canExpressInstall() {
+		return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+	}
+	
+	/* Show the Adobe Express Install dialog
+		- Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+	*/
+	function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+		isExpressInstallActive = true;
+		storedCallbackFn = callbackFn || null;
+		storedCallbackObj = {success:false, id:replaceElemIdStr};
+		var obj = getElementById(replaceElemIdStr);
+		if (obj) {
+			if (obj.nodeName == "OBJECT") { // static publishing
+				storedAltContent = abstractAltContent(obj);
+				storedAltContentId = null;
+			}
+			else { // dynamic publishing
+				storedAltContent = obj;
+				storedAltContentId = replaceElemIdStr;
+			}
+			att.id = EXPRESS_INSTALL_ID;
+			if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+			if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+			doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+			var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+				fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+			if (typeof par.flashvars != UNDEF) {
+				par.flashvars += "&" + fv;
+			}
+			else {
+				par.flashvars = fv;
+			}
+			// IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+			// because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+			if (ua.ie && ua.win && obj.readyState != 4) {
+				var newObj = createElement("div");
+				replaceElemIdStr += "SWFObjectNew";
+				newObj.setAttribute("id", replaceElemIdStr);
+				obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+				obj.style.display = "none";
+				(function(){
+					if (obj.readyState == 4) {
+						obj.parentNode.removeChild(obj);
+					}
+					else {
+						setTimeout(arguments.callee, 10);
+					}
+				})();
+			}
+			createSWF(att, par, replaceElemIdStr);
+		}
+	}
+	
+	/* Functions to abstract and display alternative content
+	*/
+	function displayAltContent(obj) {
+		if (ua.ie && ua.win && obj.readyState != 4) {
+			// IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+			// because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+			var el = createElement("div");
+			obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+			el.parentNode.replaceChild(abstractAltContent(obj), el);
+			obj.style.display = "none";
+			(function(){
+				if (obj.readyState == 4) {
+					obj.parentNode.removeChild(obj);
+				}
+				else {
+					setTimeout(arguments.callee, 10);
+				}
+			})();
+		}
+		else {
+			obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+		}
+	} 
+
+	function abstractAltContent(obj) {
+		var ac = createElement("div");
+		if (ua.win && ua.ie) {
+			ac.innerHTML = obj.innerHTML;
+		}
+		else {
+			var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+			if (nestedObj) {
+				var c = nestedObj.childNodes;
+				if (c) {
+					var cl = c.length;
+					for (var i = 0; i < cl; i++) {
+						if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+							ac.appendChild(c[i].cloneNode(true));
+						}
+					}
+				}
+			}
+		}
+		return ac;
+	}
+	
+	/* Cross-browser dynamic SWF creation
+	*/
+	function createSWF(attObj, parObj, id) {
+		var r, el = getElementById(id);
+		if (ua.wk && ua.wk < 312) { return r; }
+		if (el) {
+			if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+				attObj.id = id;
+			}
+			if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+				var att = "";
+				for (var i in attObj) {
+					if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+						if (i.toLowerCase() == "data") {
+							parObj.movie = attObj[i];
+						}
+						else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+							att += ' class="' + attObj[i] + '"';
+						}
+						else if (i.toLowerCase() != "classid") {
+							att += ' ' + i + '="' + attObj[i] + '"';
+						}
+					}
+				}
+				var par = "";
+				for (var j in parObj) {
+					if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+						par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+					}
+				}
+				el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+				objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+				r = getElementById(attObj.id);	
+			}
+			else { // well-behaving browsers
+				var o = createElement(OBJECT);
+				o.setAttribute("type", FLASH_MIME_TYPE);
+				for (var m in attObj) {
+					if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+						if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+							o.setAttribute("class", attObj[m]);
+						}
+						else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+							o.setAttribute(m, attObj[m]);
+						}
+					}
+				}
+				for (var n in parObj) {
+					if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+						createObjParam(o, n, parObj[n]);
+					}
+				}
+				el.parentNode.replaceChild(o, el);
+				r = o;
+			}
+		}
+		return r;
+	}
+	
+	function createObjParam(el, pName, pValue) {
+		var p = createElement("param");
+		p.setAttribute("name", pName);	
+		p.setAttribute("value", pValue);
+		el.appendChild(p);
+	}
+	
+	/* Cross-browser SWF removal
+		- Especially needed to safely and completely remove a SWF in Internet Explorer
+	*/
+	function removeSWF(id) {
+		var obj = getElementById(id);
+		if (obj && obj.nodeName == "OBJECT") {
+			if (ua.ie && ua.win) {
+				obj.style.display = "none";
+				(function(){
+					if (obj.readyState == 4) {
+						removeObjectInIE(id);
+					}
+					else {
+						setTimeout(arguments.callee, 10);
+					}
+				})();
+			}
+			else {
+				obj.parentNode.removeChild(obj);
+			}
+		}
+	}
+	
+	function removeObjectInIE(id) {
+		var obj = getElementById(id);
+		if (obj) {
+			for (var i in obj) {
+				if (typeof obj[i] == "function") {
+					obj[i] = null;
+				}
+			}
+			obj.parentNode.removeChild(obj);
+		}
+	}
+	
+	/* Functions to optimize JavaScript compression
+	*/
+	function getElementById(id) {
+		var el = null;
+		try {
+			el = doc.getElementById(id);
+		}
+		catch (e) {}
+		return el;
+	}
+	
+	function createElement(el) {
+		return doc.createElement(el);
+	}
+	
+	/* Updated attachEvent function for Internet Explorer
+		- Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+	*/	
+	function addListener(target, eventType, fn) {
+		target.attachEvent(eventType, fn);
+		listenersArr[listenersArr.length] = [target, eventType, fn];
+	}
+	
+	/* Flash Player and SWF content version matching
+	*/
+	function hasPlayerVersion(rv) {
+		var pv = ua.pv, v = rv.split(".");
+		v[0] = parseInt(v[0], 10);
+		v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+		v[2] = parseInt(v[2], 10) || 0;
+		return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+	}
+	
+	/* Cross-browser dynamic CSS creation
+		- Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+	*/	
+	function createCSS(sel, decl, media, newStyle) {
+		if (ua.ie && ua.mac) { return; }
+		var h = doc.getElementsByTagName("head")[0];
+		if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+		var m = (media && typeof media == "string") ? media : "screen";
+		if (newStyle) {
+			dynamicStylesheet = null;
+			dynamicStylesheetMedia = null;
+		}
+		if (!dynamicStylesheet || dynamicStylesheetMedia != m) { 
+			// create dynamic stylesheet + get a global reference to it
+			var s = createElement("style");
+			s.setAttribute("type", "text/css");
+			s.setAttribute("media", m);
+			dynamicStylesheet = h.appendChild(s);
+			if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+				dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+			}
+			dynamicStylesheetMedia = m;
+		}
+		// add style rule
+		if (ua.ie && ua.win) {
+			if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+				dynamicStylesheet.addRule(sel, decl);
+			}
+		}
+		else {
+			if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+				dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+			}
+		}
+	}
+	
+	function setVisibility(id, isVisible) {
+		if (!autoHideShow) { return; }
+		var v = isVisible ? "visible" : "hidden";
+		if (isDomLoaded && getElementById(id)) {
+			getElementById(id).style.visibility = v;
+		}
+		else {
+			createCSS("#" + id, "visibility:" + v);
+		}
+	}
+
+	/* Filter to avoid XSS attacks
+	*/
+	function urlEncodeIfNecessary(s) {
+		var regex = /[\\\"<>\.;]/;
+		var hasBadChars = regex.exec(s) != null;
+		return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+	}
+	
+	/* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+	*/
+	var cleanup = function() {
+		if (ua.ie && ua.win) {
+			window.attachEvent("onunload", function() {
+				// remove listeners to avoid memory leaks
+				var ll = listenersArr.length;
+				for (var i = 0; i < ll; i++) {
+					listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+				}
+				// cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+				var il = objIdArr.length;
+				for (var j = 0; j < il; j++) {
+					removeSWF(objIdArr[j]);
+				}
+				// cleanup library's main closures to avoid memory leaks
+				for (var k in ua) {
+					ua[k] = null;
+				}
+				ua = null;
+				for (var l in swfobject) {
+					swfobject[l] = null;
+				}
+				swfobject = null;
+			});
+		}
+	}();
+	
+	return {
+		/* Public API
+			- Reference: http://code.google.com/p/swfobject/wiki/documentation
+		*/ 
+		registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+			if (ua.w3 && objectIdStr && swfVersionStr) {
+				var regObj = {};
+				regObj.id = objectIdStr;
+				regObj.swfVersion = swfVersionStr;
+				regObj.expressInstall = xiSwfUrlStr;
+				regObj.callbackFn = callbackFn;
+				regObjArr[regObjArr.length] = regObj;
+				setVisibility(objectIdStr, false);
+			}
+			else if (callbackFn) {
+				callbackFn({success:false, id:objectIdStr});
+			}
+		},
+		
+		getObjectById: function(objectIdStr) {
+			if (ua.w3) {
+				return getObjectById(objectIdStr);
+			}
+		},
+		
+		embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+			var callbackObj = {success:false, id:replaceElemIdStr};
+			if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+				setVisibility(replaceElemIdStr, false);
+				addDomLoadEvent(function() {
+					widthStr += ""; // auto-convert to string
+					heightStr += "";
+					var att = {};
+					if (attObj && typeof attObj === OBJECT) {
+						for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+							att[i] = attObj[i];
+						}
+					}
+					att.data = swfUrlStr;
+					att.width = widthStr;
+					att.height = heightStr;
+					var par = {}; 
+					if (parObj && typeof parObj === OBJECT) {
+						for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+							par[j] = parObj[j];
+						}
+					}
+					if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+						for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+							if (typeof par.flashvars != UNDEF) {
+								par.flashvars += "&" + k + "=" + flashvarsObj[k];
+							}
+							else {
+								par.flashvars = k + "=" + flashvarsObj[k];
+							}
+						}
+					}
+					if (hasPlayerVersion(swfVersionStr)) { // create SWF
+						var obj = createSWF(att, par, replaceElemIdStr);
+						if (att.id == replaceElemIdStr) {
+							setVisibility(replaceElemIdStr, true);
+						}
+						callbackObj.success = true;
+						callbackObj.ref = obj;
+					}
+					else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+						att.data = xiSwfUrlStr;
+						showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+						return;
+					}
+					else { // show alternative content
+						setVisibility(replaceElemIdStr, true);
+					}
+					if (callbackFn) { callbackFn(callbackObj); }
+				});
+			}
+			else if (callbackFn) { callbackFn(callbackObj);	}
+		},
+		
+		switchOffAutoHideShow: function() {
+			autoHideShow = false;
+		},
+		
+		ua: ua,
+		
+		getFlashPlayerVersion: function() {
+			return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+		},
+		
+		hasFlashPlayerVersion: hasPlayerVersion,
+		
+		createSWF: function(attObj, parObj, replaceElemIdStr) {
+			if (ua.w3) {
+				return createSWF(attObj, parObj, replaceElemIdStr);
+			}
+			else {
+				return undefined;
+			}
+		},
+		
+		showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+			if (ua.w3 && canExpressInstall()) {
+				showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+			}
+		},
+		
+		removeSWF: function(objElemIdStr) {
+			if (ua.w3) {
+				removeSWF(objElemIdStr);
+			}
+		},
+		
+		createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+			if (ua.w3) {
+				createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+			}
+		},
+		
+		addDomLoadEvent: addDomLoadEvent,
+		
+		addLoadEvent: addLoadEvent,
+		
+		getQueryParamValue: function(param) {
+			var q = doc.location.search || doc.location.hash;
+			if (q) {
+				if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+				if (param == null) {
+					return urlEncodeIfNecessary(q);
+				}
+				var pairs = q.split("&");
+				for (var i = 0; i < pairs.length; i++) {
+					if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+						return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+					}
+				}
+			}
+			return "";
+		},
+		
+		// For internal usage only
+		expressInstallCallback: function() {
+			if (isExpressInstallActive) {
+				var obj = getElementById(EXPRESS_INSTALL_ID);
+				if (obj && storedAltContent) {
+					obj.parentNode.replaceChild(storedAltContent, obj);
+					if (storedAltContentId) {
+						setVisibility(storedAltContentId, true);
+						if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+					}
+					if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+				}
+				isExpressInstallActive = false;
+			} 
+		}
+	};
+}();

BIN
gkaq/gis-flex/trunk/libs/Cairngorm.swc


BIN
gkaq/gis-flex/trunk/libs/FlexBevLib.swc


BIN
gkaq/gis-flex/trunk/libs/LegendTree.swc


BIN
gkaq/gis-flex/trunk/libs/SuperMap.Web-7.0.1-11327.swc


BIN
gkaq/gis-flex/trunk/libs/SuperMap.Web.Gear-7.0.1-11327.swc


BIN
gkaq/gis-flex/trunk/libs/SuperMap.Web.iServerJava7C-7.0.1-11327.swc


+ 107 - 0
gkaq/gis-flex/trunk/locale/zh_CN/select.properties

@@ -0,0 +1,107 @@
+SZD.GKJ.ZHENJIANG	=	\u9547\u6c5f\u6e2f\u53e3\u5c40
+SZD.GKJ.SUZHOU	=	\u82cf\u5dde\u6e2f\u53e3\u5c40
+SZD.GKJ.LIANYUNGANG	=	\u8fde\u4e91\u6e2f\u6e2f\u53e3\u5c40
+SZD.GKJ.NANJING	=	\u5357\u4eac\u6e2f\u53e3\u5c40
+SZD.GKJ.NANTONG	=	\u5357\u901a\u6e2f\u53e3\u5c40
+SZD.GKJ.WUXI	=	\u65e0\u9521\u6e2f\u53e3\u5c40
+SZD.GKJ.YANGZHOU	=	\u626c\u5dde\u6e2f\u53e3\u5c40
+SZD.GKJ.TAIZHOU	=	\u6cf0\u5dde\u6e2f\u53e3\u5c40
+SZD.GKJ.YANCHENG	=	\u76d0\u57ce\u6e2f\u53e3\u5c40
+SZD.GKJ.XUZHOU	=	\u5f90\u5dde\u6e2f\u53e3\u5c40
+SZD.GKJ.CHANGZHOU	=	\u5e38\u5dde\u6e2f\u53e3\u5c40
+SZD.GKJ.XUQIAN	=	\u5bbf\u8fc1\u6e2f\u53e3\u5c40
+SZD.GKJ.HUAIAN	=	\u6dee\u5b89\u6e2f\u53e3\u5c40
+SZD.GKJ.ZHENJIANGNEIHE	=	\u9547\u6c5f\u5185\u6cb3\u6e2f\u53e3\u5c40
+SZD.GKJ.NANTONGNEIHE	=	\u5357\u901a\u5185\u6cb3\u6e2f\u53e3\u5c40
+SZD.GKJ.LIANYUNGANGNEIHE	=	\u8fde\u4e91\u6e2f\u5185\u6cb3\u6e2f\u53e3\u5c40
+SZD.GKJ.YANCHENGNEIHE	=	\u76d0\u57ce\u5185\u6cb3\u6e2f\u53e3\u5c40
+
+SSFL.AQFHJBJSC=\u5b89\u5168\u9632\u62a4\u53ca\u62a5\u8b66\u8bbe\u65bd
+SSFL.AQFHJBJSC.FDMJ=\u9632\u6bd2\u9762\u5177
+SSFL.AQFHJBJSC.JDSFZ=\u9759\u7535\u91ca\u653e\u67f1
+SSFL.AQFHJBJSC.KYQTJCY=\u53ef\u71c3\u6c14\u4f53\u68c0\u6d4b\u4eea
+SSFL.AQFHJBJSC.SCBAKQHXQ=SCBA\u7a7a\u6c14\u547c\u5438\u5668
+SSFL.AQFHJBJSC.TQJCY=\u78b3\u6c22\u68c0\u6d4b\u4eea
+
+SZD.SEHNGJI=\u7701\u7ea7
+SZD.JIANGSU=\u6c5f\u82cf\u7701
+SZD.SUZHOU=\u82cf\u5dde
+SZD.ZHENJIANG=\u9547\u6c5f
+SZD.LIANYUNGANG=\u8fde\u4e91\u6e2f
+SZD.NANJING=\u5357\u4eac
+SZD.NANTONG=\u5357\u901a
+SZD.WUXI=\u65e0\u9521
+SZD.YANGZHOU=\u626c\u5dde
+SZD.TAIZHOU=\u6cf0\u5dde
+SZD.YANCHENG=\u76d0\u57ce
+SZD.XUZHOU=\u5f90\u5dde
+SZD.CHANGZHOU=\u5e38\u5dde
+SZD.XUQIAN=\u5bbf\u8fc1
+SZD.HUAIAN=\u6dee\u5b89
+SZD.ZHENJIANGNEIHE=\u9547\u6c5f\u5185\u6cb3
+SZD.NANTONGNEIHE=\u5357\u901a\u5185\u6cb3
+SZD.LIANYUNGANGNEIHE=\u8fde\u4e91\u6e2f\u5185\u6cb3
+SZD.YANCHENGNEIHE=\u76d0\u57ce\u5185\u6cb3
+SZD.SUZHOULOCAL=\u82cf\u5dde\u672c\u90e8
+SZD.HUAIANLOCAL=\u6dee\u5b89\u672c\u90e8
+SZD.ZHANGJIAGANG=\u5f20\u5bb6\u6e2f
+SZD.TAICANG=\u592a\u4ed3
+SZD.CHANGSHU=\u5e38\u719f
+SZD.LIANSHUI=\u6d9f\u6c34\u53bf
+SZD.HUAIYIN=\u6dee\u9634\u53bf
+SZD.HUAIANQU=\u6dee\u5b89\u533a
+SZD.HONGZE=\u6d2a\u6cfd\u53bf
+SZD.XUYU=\u76f1\u7719\u53bf
+SZD.JINHU=\u91d1\u6e56\u53bf
+SZD.XUZHOULOCAL=\u5f90\u5dde\u672c\u90e8
+SZD.TONGSHANXIAN=\u94dc\u5c71\u533a
+SZD.JIAWANGQU=\u8d3e\u6c6a\u533a
+SZD.FENGXIAN=\u4e30\u53bf
+SZD.PEIXIAN=\u6c9b\u53bf
+SZD.PIZHOU=\u90b3\u5dde
+SZD.XINYI=\u65b0\u6c82
+SZD.SUINING=\u7762\u5b81
+SZD.CHANGZHOULOCAL=\u5e38\u5dde\u672c\u90e8
+SZD.WUJIN=\u6b66\u8fdb
+SZD.JINTAN=\u91d1\u575b
+SZD.LIYANG=\u6ea7\u9633
+
+sex.female=\u5973
+sex.male=\u7537
+
+##\u5e94\u6025\u4e13\u5bb6\u5e93\u4e13\u957f\u7c7b\u522b
+ZJYWTC.GKAQZHGL	=	\u6e2f\u53e3\u5b89\u5168\u7efc\u5408\u7ba1\u7406	
+ZJYWTC.WXHWCYGL	=	\u5371\u9669\u8d27\u7269\u50a8\u8fd0\u7ba1\u7406
+ZJYWTC.MTGC	=	\u7801\u5934\u5de5\u7a0b
+ZJYWTC.HGGC	=	\u5316\u5de5\u5de5\u7a0b
+ZJYWTC.JXDQJCB	=	\u673a\u68b0\u3001\u7535\u6c14\u53ca\u8239\u8236
+ZJYWTC.XFJQT	=	\u6d88\u9632\u53ca\u5176\u4ed6
+ZJYWTC.XCGL	=	\u73b0\u573a\u7ba1\u7406
+ZJYWTC.JSXM	=	\u5efa\u8bbe\u9879\u76ee
+ZJYWTC.YQCY	=	\u6cb9\u6c14\u50a8\u8fd0
+ZJYWTC.BZHGL	=	\u6807\u51c6\u5316\u7ba1\u7406
+
+#\u662f\u5426\u751f\u6548
+Yes = \u662f
+No  = \u5426
+
+#\u4e8b\u4ef6\u7c7b\u578b#
+sjlx.yz=\u5e94\u6025\u54cd\u5e94\u7a0b\u5e8f
+sjlx.yryb=\u6e2f\u53e3\u4f01\u4e1a\u6613\u71c3\u3001\u6613\u7206\u5371\u9669\u8d27\u7269\u6cc4\u6f0f\u4e8b\u6545
+sjlx.ydyh=\u6e2f\u53e3\u4f01\u4e1a\u6709\u6bd2\u3001\u6709\u5bb3\u5371\u9669\u8d27\u7269\u6cc4\u6f0f\u4e8b\u6545
+sjlx.ztdhz=\u6e2f\u53e3\u4f01\u4e1a\u91cd\u3001\u7279\u5927\u706b\u707e\u4e8b\u6545 
+sjlx.ztdbz=\u6e2f\u53e3\u4f01\u4e1a\u91cd\u3001\u7279\u5927\u7206\u70b8\u4e8b\u6545
+sjlx.ztdypxl=\u6e2f\u53e3\u4f01\u4e1a\u91cd\u3001\u7279\u5927\u6cb9\u54c1\u6cc4\u6f0f\u4e8b\u6545
+sjlx.ztdzrzh=\u91cd\u3001\u7279\u5927\u81ea\u7136\u707e\u5bb3\u4e8b\u6545
+sjlx.syqj=\u4e8b\u6545\u73b0\u573a\u4f24\u5458\u62a2\u6551\u7a0b\u5e8f
+sjlx.sscx=\u4e8b\u6545\u73b0\u573a\u4eba\u5458\u758f\u6563\u7a0b\u5e8f
+sjlx.gzcx=\u8b66\u6212\u4e0e\u4ea4\u901a\u7ba1\u5236\u7a0b\u5e8f
+sjlx.glcx=\u4fe1\u606f\u7ba1\u7406\u7a0b\u5e8f
+sjlx.jycx=\u951a\u5730\u4e8b\u6545\u5e94\u6025\u6551\u63f4\u7a0b\u5e8f
+sjlx.hfcx=\u5e94\u6025\u6062\u590d\u7a0b\u5e8f
+sjlx.jscx=\u5e94\u6025\u7ed3\u675f\u7a0b\u5e8f
+sjlxnj.1=\u6e2f\u53e3\u7801\u5934\u91cd\u7279\u5927\u4e8b\u6545\u5e94\u6025\u6551\u63f4\u9884\u6848
+sjlxnj.2=\u822a\u8fd0\uff08\u6e2f\u653f\uff09\u7ba1\u7406\u5904\u9632\u53f0\u9632\u6c5b\u6297\u65f1\u5e94\u6025\u9884\u6848
+##\u50a8\u7f50\u6750\u8d28
+cgcz.tg=\u78b3\u94a2
+cgcz.bxg=\u4e0d\u9508\u94a2

+ 393 - 0
gkaq/gis-flex/trunk/src/Main.mxml

@@ -0,0 +1,393 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
+			   xmlns:s="library://ns.adobe.com/flex/spark" 
+			   xmlns:ic="http://www.supermap.com/iclient/2010"
+			   xmlns:is="http://www.supermap.com/iserverjava/2010" 
+			   xmlns:mx="library://ns.adobe.com/flex/mx"
+			   xmlns:tree="com.tree.*"
+			   creationComplete="init();" 
+			   xmlns:main="com.main.*" xmlns:server="com.server.*" xmlns:show="com.show.*" xmlns:detail="com.view.detail.*" xmlns:view="com.view.*">
+	
+	<fx:Declarations>
+		<server:XMLDecoder id="xmlDecoder" mapConfigLoad="xmlDecoder_configloadHandler(event)"
+						   menuConfigLoad="xmlDecoder_menuConfigLoadHandler(event)"/>
+		<!-- 将非可视元素(例如服务、值对象)放在此处 -->
+		<s:Move id="toolsCtMove" target="{toolsCt}" duration="500"/>
+		<s:Move id="btnMove" target="{arrowLeft}" duration="500"/>
+		
+		<server:Service/>
+	</fx:Declarations>
+	<fx:Metadata>
+		[ResourceBundle("select")]
+	</fx:Metadata>
+	<fx:Script source="com/main/infoWindowHandle.as"/>
+	<fx:Script source="com/main/show.as"/>
+	<fx:Script source="com/main/bufferAnalyst.as"/>
+	<fx:Script>
+		<![CDATA[
+			import com.common.ConfigUtil;
+			import com.events.DataConfigEvent;
+			import com.events.MenusEvent;
+			import com.server.QueryAction;
+			import com.supermap.framework.events.BaseEventDispatcher;
+			import com.supermap.web.actions.DrawLine;
+			import com.supermap.web.actions.DrawPoint;
+			import com.supermap.web.actions.DrawPolygon;
+			import com.supermap.web.actions.Edit;
+			import com.supermap.web.core.Feature;
+			import com.supermap.web.core.geometry.GeoLine;
+			import com.supermap.web.core.geometry.GeoPoint;
+			import com.supermap.web.core.geometry.GeoRegion;
+			import com.supermap.web.core.styles.PictureMarkerStyle;
+			import com.supermap.web.events.DrawEvent;
+			import com.supermap.web.events.LayerEvent;
+			import com.supermap.web.mapping.FeaturesLayer;
+			import com.supermap.web.mapping.TiledDynamicRESTLayer;
+			import com.supermap.web.utils.CoordinateReferenceSystem;
+			import com.view.AqtcWindow;
+			import com.view.ExpertWindow;
+			import com.view.YjyaViewWindow;
+			import com.view.detail.PointDetail;
+			import com.view.tjcx.ResourceNode;
+			import com.view.tjcx.TjcxWindow;
+			import com.view.tjcx.ZydwWindow;
+			
+			import mx.binding.utils.BindingUtils;
+			import mx.collections.ArrayCollection;
+			import mx.containers.Grid;
+			import mx.controls.Alert;
+			import mx.core.FlexGlobals;
+			import mx.core.UIComponent;
+			import mx.events.CloseEvent;
+			import mx.events.FlexEvent;
+			import mx.managers.PopUpManager;
+			import mx.rpc.events.ResultEvent;
+			import mx.utils.Base64Decoder;
+			import mx.utils.Base64Encoder;
+			import mx.utils.URLUtil;
+			
+			import spark.components.CheckBox;
+			import spark.components.TitleWindow;
+
+			private var point:String = "1";
+			private var line:String = "2";
+			private var polygon:String = "3";
+			/** 当前是否显示了工具窗口 */
+			private var toolsShow:Boolean = true;
+			private var gkzyLayer:TiledDynamicRESTLayer;
+
+			private var layer:TiledDynamicRESTLayer;
+			
+			private var layerDOM:TiledDynamicRESTLayer = null;
+
+			private var baseFLayer:FeaturesLayer;
+			
+			private var fLayer:FeaturesLayer;
+
+			private var currSelectedLayerId:String;
+
+			public var mapConfig:XML = null;
+			public var menuConfig:XML = null;
+			public var serverName:String = null;
+			public var port:Number;
+
+			private var expertWin:ExpertWindow =new ExpertWindow();
+			private var tjcxWindow:TjcxWindow = new TjcxWindow;
+			private var zydwWindow:ZydwWindow = new ZydwWindow;
+			private var aqtcWindow:AqtcWindow = new AqtcWindow;
+			[Bindable]
+			public var menuXML:XML = null;
+			[Bindable]
+			private var queryData:ArrayCollection = new ArrayCollection();
+			private var crs:CoordinateReferenceSystem = new CoordinateReferenceSystem(4326);
+			private function init():void
+			{
+				var url:String = this.parent.loaderInfo.url;;
+				port = URLUtil.getPort(url);
+				serverName= URLUtil.getServerName(url);
+				this.menuXML = ConfigUtil.getMenuXML("M_AQXT",this.menuConfig);
+				BindingUtils.bindProperty(aqtcWindow,"menuXML",this,"menuXML");
+				aqtcWindow.checkBoxClickHandler = checkBox_click;
+				BaseEventDispatcher.getInstance().addEventListener(QueryLayerEvent.QUERY_SUCCESS, queryLayerSuccess);
+				BaseEventDispatcher.getInstance().addEventListener(QueryLayerEvent.QUERY_SUCCESS, queryLayerFault);
+				BaseEventDispatcher.getInstance().addEventListener(MenusEvent.MENUHIDE, movePenal);
+				CommonUtility.callRemote("gisController","getLoginUser",getLoginUserResultHandler);
+			}
+			protected function getLoginUserResultHandler(event:ResultEvent):void
+			{
+				var ret:Object=event.result;
+				ConstUtil.currSzd=ret.szd.id;
+				this.initDomLayer();
+			}
+			private function movePenal(e:MenusEvent = null):void
+			{
+				this.toolsCtMove.end();
+				if(toolsShow)
+				{
+					this.toolsCtMove.xTo=FlexGlobals.topLevelApplication.width;
+				}else
+				{
+					this.toolsCtMove.xTo=FlexGlobals.topLevelApplication.width-this.toolsCt.width;
+				}
+				this.toolsCtMove.play();
+				
+				// 移动显示按钮
+				this.btnMove.end();
+				if(toolsShow)
+				{
+					this.btnMove.xTo=FlexGlobals.topLevelApplication.width-19;
+				}else
+				{
+					this.btnMove.xTo=FlexGlobals.topLevelApplication.width;
+				}
+				this.btnMove.play();
+				
+				toolsShow = !toolsShow;
+			}
+			
+			private function initLocation():void
+			{
+				mapIcon_clickHandler(null,"dom");
+				var args:Object = getParams();
+				// 定位处理
+				if(args.action=="location")
+				{
+					var conditions:String = "";
+					if(args.id)
+					{
+						conditions="ID="+args.id;
+					}
+					
+					if(args.name)
+					{
+						conditions="Name='"+decodeURIComponent(args.name)+"'";
+					}
+					var scale:Number = 175000;
+					if(args.scale)
+					{
+						scale = new Number(args.scale);
+					}
+					var showDom:Boolean = true;
+					if(args.dom)
+					{
+						showDom = "true"==args.dom;
+					}
+					if(args.layer)
+					{
+						this.location(args.layer,conditions,scale,showDom);
+					}
+				}
+			}
+			
+			private function initDomLayer():void
+			{
+				this.layerDOM = this.createTiledDynamicRESTLayer("dom",ConstUtil.SERVICE_ID_DOM,false,256,false);
+				this.layerDOM.addEventListener(LayerEvent.LOAD_ERROR,addLayerError);
+				this.map.addLayer(this.layerDOM);
+				
+				this.initZYLayer();
+			}
+			
+			private function initZYLayer():void
+			{
+				this.layer = this.createTiledDynamicRESTLayer("dzdt",ConstUtil.SERVICE_ID_SLDT,true,256,true);
+				this.map.addLayer(this.layer);
+				this.gkzyLayer = this.createTiledDynamicRESTLayerWithSpecialLay("gkzy",ConstUtil.SERVICE_ID_GKZY,256,true);
+				this.map.addLayer(this.gkzyLayer);
+				if(!this.baseFLayer)
+					this.baseFLayer = new FeaturesLayer();
+				this.map.addLayer(this.baseFLayer);
+				if(!this.fLayer)
+					this.fLayer = new FeaturesLayer();
+				this.map.addLayer(this.fLayer);
+				this.initLocation();
+			}
+			
+			private function addLayerError(event:LayerEvent):void
+			{
+				var layer:TiledDynamicRESTLayer = event.currentTarget as TiledDynamicRESTLayer;
+				if(layer.id == "dom")
+					this.initZYLayer();
+				else if(layer.id == "dzdt")
+					Alert.show("加载电子地图失败!","异常");
+				else if(layer.id == "sydt")
+					this.initDomLayer();
+			}
+			
+			private function createTiledDynamicRESTLayer(id:String,serviceId:String,emptyLaysID:Boolean=false,tileSize:int = 256,visible:Boolean = true):TiledDynamicRESTLayer
+			{
+				var tiledLayer:TiledDynamicRESTLayer = new TiledDynamicRESTLayer();
+				tiledLayer.transparent = true;
+				tiledLayer.url = ConfigUtil.getMapServiceUrl(serviceId);
+				tiledLayer.id = id;
+				tiledLayer.CRS = crs;
+				if(emptyLaysID)
+					tiledLayer.layersID="";
+				tiledLayer.tileSize = tileSize;
+				tiledLayer.enableServerCaching = true;
+				tiledLayer.visible = visible;
+				return tiledLayer;
+			}
+			private function createTiledDynamicRESTLayerWithSpecialLay(id:String,serviceId:String,tileSize:int = 256,visible:Boolean = true):TiledDynamicRESTLayer
+			{
+				var tiledLayer:TiledDynamicRESTLayer = new TiledDynamicRESTLayer();
+				tiledLayer.transparent = true;
+				tiledLayer.url = ConfigUtil.getMapServiceUrl(serviceId);
+				tiledLayer.id = id;
+				tiledLayer.CRS = crs;
+				tiledLayer.layersID="[0:68,79,82]";
+				tiledLayer.tileSize = tileSize;
+				tiledLayer.enableServerCaching = true;
+				tiledLayer.visible = visible;
+				return tiledLayer;
+			}
+			
+			
+			private function getParams():Object {
+				var params:Object = {};
+				var query:String = ExternalInterface.call("window.location.search.substring", 1);
+				if(query) {
+					var pairs:Array = query.split("&");
+					for(var i:uint=0; i < pairs.length; i++) {
+						var pos:int = pairs[i].indexOf("=");
+						//Alert.show(String(pos));
+						if(pos != -1) {
+							var argname:String = pairs[i].substring(0, pos);
+							var value:String = pairs[i].substring(pos+1);
+							params[argname] = value;
+						}
+					}
+				}
+				return params;
+			}
+			protected function mapIcon_clickHandler(event:MouseEvent = null,type:String = null):void
+			{
+				var parmStr:String = "layer";
+				if(type)
+				{
+					if((type == "dom" && this.mapIcon.source == "images/map/map.png") ||
+						(type == "layer" && this.mapIcon.source == "images/map/satellite.png"))
+					{
+						return;
+					}
+					if(type == "dom")
+					{
+						this.mapIcon.source="images/map/map.png";
+						this.layer.visible = false;
+						this.layerDOM.visible = true;
+					}
+					else
+					{
+						this.mapIcon.source="images/map/satellite.png";
+						this.layerDOM.visible = false;
+						this.layer.visible = true;
+					}
+					parmStr = type;
+				}
+				else
+				{
+					if(this.mapIcon.source.toString() == "images/map/map.png")
+					{
+						this.mapIcon.source="images/map/satellite.png";
+						this.layerDOM.visible = false;
+						this.layer.visible = true;
+					}
+					else
+					{
+						parmStr = "dom";
+						this.mapIcon.source="images/map/map.png";
+						this.layer.visible = false;
+						this.layerDOM.visible = true;
+					}
+				}
+
+			}
+
+			public function getMap():Map
+			{
+				return this.map;
+			}
+
+			protected function xmlDecoder_configloadHandler(event:DataConfigEvent):void
+			{
+				this.mapConfig = event.data as XML;
+			}
+
+			protected function xmlDecoder_menuConfigLoadHandler(event:DataConfigEvent):void
+			{
+				this.menuConfig =  event.data as XML;
+				this.featureStyle = ConfigUtil.getFeatureStyle(this.menuConfig);
+			}
+			/** 统计查询处理 */
+			protected function tjcx_clickHandler(event:MouseEvent = null,type:String = null):void
+			{
+				PopUpManager.addPopUp(tjcxWindow,FlexGlobals.topLevelApplication as DisplayObject,false);
+				PopUpManager.centerPopUp(tjcxWindow);
+			}
+			/** 统计查询处理 */
+			protected function zydw_clickHandler(event:MouseEvent = null,type:String = null):void
+			{
+				if(zydwWindow.resourceNodes == null)
+				{
+					CommonUtility.callRemote("gisController","getZyNodes",resultHandler);
+				}
+				else
+				{
+					PopUpManager.addPopUp(zydwWindow,FlexGlobals.topLevelApplication as DisplayObject,false);
+					PopUpManager.centerPopUp(zydwWindow);
+				}
+			}
+			protected function resultHandler(event:ResultEvent):void
+			{
+				var ret:ArrayCollection=event.result as ArrayCollection;
+				zydwWindow.resourceNodes  = ret;
+				PopUpManager.addPopUp(zydwWindow,FlexGlobals.topLevelApplication as DisplayObject,false);
+				PopUpManager.centerPopUp(zydwWindow);
+			}
+			/**  应急专家 */
+			public function expert_clickHandler(event:MouseEvent = null,type:String = null):void
+			{
+				showExpert();
+			}
+			public function showExpert(comp:String=null,dwid:Number = 0):void
+			{
+				expertWin.dwmc=comp;
+				expertWin.szd=dwid;
+				expertWin.doSearch();
+				PopUpManager.addPopUp(expertWin,FlexGlobals.topLevelApplication as DisplayObject,false);
+				PopUpManager.centerPopUp(expertWin);
+			}
+			/** 安全系统图层 */
+			protected function aqtc_clickHandler(event:MouseEvent = null,type:String = null):void
+			{
+				PopUpManager.addPopUp(aqtcWindow,FlexGlobals.topLevelApplication as DisplayObject,false);
+				PopUpManager.centerPopUp(aqtcWindow);
+			}
+			/** 定位经营人 */
+			public function locateJyr(id:String,nm:String):void
+			{
+				var conditions:String ="ID="+id;
+				var scale:Number = 5000;
+				this.location("L_ID_AQ_WXHWQY",conditions,scale,true,false);
+//				this.detailCt.recordId = id;
+//				this.detailCt.gkjyr = nm;
+//				this.detailCt.show = true;
+			}
+			protected function hiddenLable_clickHandler(event:MouseEvent):void
+			{
+				BaseEventDispatcher.getInstance().dispatchEvent(new MenusEvent(MenusEvent.MENUHIDE,"hide"));
+			}
+		]]>
+	</fx:Script>
+	<ic:Map id="map" viewBounds="{new Rectangle2D(116.78815757821073,31.25328451029112,122.42101218345877,33.85528396557042)}"  >
+	</ic:Map>
+	<main:MapOperateModel top="10" right="10"/>
+	<!-- 安全系统图层 -->
+	<s:Image id="aqtc" click="aqtc_clickHandler(event)" source="images/aqtc.png" useHandCursor="true" buttonMode="true" top="45" right="10" toolTip="安全系统图层"/>
+	<s:Image id="mapIcon" click="mapIcon_clickHandler(event)" source="images/map/satellite.png" useHandCursor="true" buttonMode="true" bottom="15" left="15" visible="false"/>
+	<s:Image id="tjcx" click="tjcx_clickHandler(event)" source="images/map/cxtj.png" useHandCursor="true" buttonMode="true" top="15" left="15" toolTip="统计查询"/>
+	<!-- 资源定位 -->
+	<s:Image id="zydw" click="zydw_clickHandler(event)" source="images/map/yjcz.png" useHandCursor="true" buttonMode="true" top="15" left="80" toolTip="资源定位"/>
+	<s:Image id="arrowLeft" click="hiddenLable_clickHandler(event)" source="images/arrowRight.png" useHandCursor="true" buttonMode="true" y="100"  x="{FlexGlobals.topLevelApplication.width}" />
+	<detail:MapTools id="toolsCt" y="100" x="{FlexGlobals.topLevelApplication.width-280}" width="280" height="520" menuXML="{this.menuXML}" treeClickFun="checkBox_click" />
+</s:Application>

+ 17 - 0
gkaq/gis-flex/trunk/src/QueryLayerEvent.as

@@ -0,0 +1,17 @@
+package
+{
+	import com.supermap.framework.events.BaseEvent;
+
+	public class QueryLayerEvent extends BaseEvent
+	{
+		public static const QUERY_SUCCESS:String = "QUERY_SUCCESS";
+		
+		public static const QUERY_FAULT:String = "QUERY_FAULT";
+		
+		public function QueryLayerEvent(type:String,  data:Object=null)
+		{
+			super(type);
+			if (data != null) _data = data;
+		}
+	}
+}

+ 182 - 0
gkaq/gis-flex/trunk/src/com/common/ConfigUtil.as

@@ -0,0 +1,182 @@
+package com.common
+{
+	import com.supermap.web.core.styles.PredefinedFillStyle;
+	import com.supermap.web.core.styles.PredefinedLineStyle;
+	
+	import flash.external.ExternalInterface;
+	
+	import mx.controls.Alert;
+	import mx.core.FlexGlobals;
+
+	public class ConfigUtil
+	{
+		public function ConfigUtil()
+		{
+		}
+		
+		public static function getMenuXML(id:String,xml:XML):XML
+		{
+			if(xml == null)
+				return null;
+			for each(var x:XML in xml.children())
+			{
+				if(x.@CDID == id)
+					return x;
+			}
+			return null;
+		}
+		
+		public static function getMapLayerNameAndOwner(layerId:String):String
+		{
+			try
+			{
+				//var serviceList:XMLList = mapConfig.MapServices.Service;
+				var serviceList:XMLList = FlexGlobals.topLevelApplication.mapConfig.MapServices.Service;
+				var id:String = layerId;
+				if(layerId.indexOf("#")>0)
+				{
+					id = layerId.substring(0,layerId.indexOf("#"));
+				}
+				for each(var xml:XML in serviceList)
+				{
+					if("SERVICE_ID_GKZY" == xml.@ID)
+					{
+						for each(var xmlLayer:XML in xml.Layer)
+						{
+							if(id == xmlLayer.@ID)
+								return xmlLayer.@Name + "@" + xmlLayer.@Owner;
+						}
+					}
+				}
+			}
+			catch(err:Error)
+			{
+				return null;
+			}
+			return null;
+		}
+		
+		public static function getMapUrl(layerId:String):String
+		{
+			try
+			{
+				var serviceList:XMLList = FlexGlobals.topLevelApplication.mapConfig.MapServices.Service;
+				var id:String = layerId;
+				if(layerId.indexOf("#")>0)
+				{
+					id = layerId.substring(0,layerId.indexOf("#"));
+				}
+				for each(var xml:XML in serviceList)
+				{
+					for each(var xmlLayer:XML in xml.Layer)
+					{
+						if(id == xmlLayer.@ID){
+							return getRealUrl(xml.@URL);
+						}
+					}
+				}
+			}
+			catch(err:Error)
+			{
+				return null;
+			}
+			return null;
+		}
+		/**
+		 * 根据xml配置的url获取真正的url
+		 */
+		public static function getRealUrl(xmlUrl:String):String
+		{
+			xmlUrl =xmlUrl.replace("${serverName}",FlexGlobals.topLevelApplication.serverName);
+			xmlUrl =xmlUrl.replace("${port}",FlexGlobals.topLevelApplication.port);
+			return xmlUrl
+		}
+		public static function getMapServiceUrl(serviceId:String):String
+		{
+			try
+			{
+				var serviceList:XMLList = FlexGlobals.topLevelApplication.mapConfig.MapServices.Service;
+				for each(var xml:XML in serviceList)
+				{
+					if(serviceId == xml.@ID)
+					{
+						return getRealUrl(xml.@URL);
+					}
+				}
+			}
+			catch(err:Error)
+			{
+				return null;
+			}
+			return null;
+		}
+		
+		public static function getFeatureStyle(xml:XML):Object
+		{
+			var obj:Object = new Object();
+			for each(var x:XML in xml.children())
+			{
+				for each(var x0:XML in x.children())
+				{
+					obj[x0.@CDID] = x0.@CDTB;
+				}
+			}
+			return obj;
+		}
+		
+		public static function getMapLayerLabel(layerId:String):String
+		{
+			try
+			{
+				//var serviceList:XMLList = mapConfig.MapServices.Service;
+				var serviceList:XMLList = FlexGlobals.topLevelApplication.mapConfig.MapServices.Service;
+				var id:String = layerId;
+				if(layerId.indexOf("#")>0)
+				{
+					id = layerId.substring(0,layerId.indexOf("#"));
+				}
+				for each(var xml:XML in serviceList)
+				{
+					if("SERVICE_ID_GKZY" == xml.@ID)
+					{
+						for each(var xmlLayer:XML in xml.Layer)
+						{
+							if(id == xmlLayer.@ID)
+								return xmlLayer.@Label;
+						}
+					}
+				}
+			}
+			catch(err:Error)
+			{
+				return null;
+			}
+			return null;
+		}
+		
+		
+		public static function getPolygonStyle(fillColor:uint = 0x009933,fillAlpha:Number = .6,
+											   lineColor:uint = 0xFFFF00,lineWeight:int = 0,lineAlpha:Number = 0):PredefinedFillStyle
+		{
+			var lineStyle:PredefinedLineStyle = new PredefinedLineStyle();
+			lineStyle.color = lineColor; 
+			lineStyle.alpha = lineAlpha;
+			lineStyle.weight = lineWeight;
+			
+			var polygonStyle:PredefinedFillStyle = new PredefinedFillStyle();
+			polygonStyle.color = fillColor;
+			polygonStyle.border = lineStyle;
+			polygonStyle.alpha = fillAlpha;
+			
+			return polygonStyle;
+		}
+		
+		public static function getPolylineStyle(color:uint = 0xF00000,weight:int = 5):PredefinedLineStyle
+		{
+			var lineStyle:PredefinedLineStyle = new PredefinedLineStyle();
+			lineStyle.color = color; 
+			lineStyle.weight = weight;
+			return lineStyle;
+		}
+	}
+}

+ 68 - 0
gkaq/gis-flex/trunk/src/com/common/ConstUtil.as

@@ -0,0 +1,68 @@
+package com.common
+{
+	public class ConstUtil
+	{
+		public function ConstUtil()
+		{
+		}
+		
+		/**
+		 * 地图服务——业务资源(港口资源)
+		 * */
+		public static var SERVICE_ID_GKZY:String = "SERVICE_ID_GKZY";
+		
+		/**
+		 * 地图服务——电子地图(矢量底图、基础地理)
+		 * */
+		public static var SERVICE_ID_SLDT:String = "SERVICE_ID_SLDT";
+		
+		public static var SERVICE_ID_DOM:String = "SERVICE_ID_DOM";
+		
+		/**
+		 * 图层ID——港口危险化学品仓储设施
+		 * */
+		public static var L_ID_AQ_WHPCCSS:String = "L_ID_AQ_WHPCCSS";	
+		
+		/**
+		 * 图层ID——港口危险货物企业
+		 * */
+		public static var L_ID_AQ_WXHWQY:String = "L_ID_AQ_WXHWQY";	
+		
+		/**
+		 * 图层ID——取水口
+		 * */
+		public static var L_ID_AQ_QSK:String = "L_ID_AQ_QSK";	
+		
+		/**
+		 * 图层ID——应急物资库
+		 * */
+		public static var L_ID_AQ_YJWZK:String = "L_ID_AQ_YJWZK";	
+		
+		/**
+		 * 图层ID——重大危险源企业
+		 * */
+		public static var L_ID_AQ_ZDWXYQY:String = "L_ID_AQ_ZDWXYQY";
+		/** 应急网络-消防 */
+		public static var L_ID_AQ_XF:String = "L_ID_AQ_XF";
+		/** 应急网络-医院 */
+		public static var L_ID_AQ_YY:String = "L_ID_AQ_YY";	
+		/** 应急网络-交警 */
+		public static var L_ID_AQ_JJ:String = "L_ID_AQ_JJ";
+		/** 应急网络-公安 */
+		public static var L_ID_AQ_GA:String = "L_ID_AQ_GA";	
+		/** 应急网络-边防 */
+		public static var L_ID_AQ_BF:String = "L_ID_AQ_BF";	
+		/** 应急网络-环保 */
+		public static var L_ID_AQ_HB:String = "L_ID_AQ_HB";	
+		/** 应急网络-搜救中心 */
+		public static var L_ID_AQ_SJZX:String = "L_ID_AQ_SJZX";	
+		/** 罐区 */
+		public static var L_ID_AQ_GQ:String = "L_ID_AQ_GQ";	
+		/** 泊位 */
+		public static var L_ID_BW_AQ:String = "L_ID_BW";	
+		/** 摄像头 */
+		public static var L_ID_SP:String = "L_ID_SP";	
+		/** 当前用户所在地 */
+		public static var currSzd:Number = 0;
+	}
+}

+ 229 - 0
gkaq/gis-flex/trunk/src/com/config/MapConfig.xml

@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Root>
+	<MapServices>   
+		<Service Label="遥感影像" ID="SERVICE_ID_DOM" Type="A" URL="http://${serverName}:${port}/iserver/services/map-STDOM/rest/maps/jshdimage@iServerREST">
+		</Service>
+		<Service Label="矢量底图" ID="SERVICE_ID_SLDT" Type="AB" URL="http://${serverName}:${port}/iserver/services/map-gk/rest/maps/gist">
+		</Service>
+		<Service Label="首页地图" ID="SERVICE_ID_SYDT" Type="AB" URL="http://${serverName}:${port}/iserver/services/map-gk/rest/maps/gist1">
+		</Service>
+		<Service Label="港口资源" ID="SERVICE_ID_GKZY" Type="" URL="http://${serverName}:${port}/iserver/services/map-GKZY/rest/maps/GKZY">
+			<Layer Label="过江通道文字标签" ID="L_ID_JSY_GJTD_A" Name="V0716过江通道" Owner="GKZYData.1" Show="1"/>
+			<Layer Label="高等级航道标签" ID="L_ID_JSY_GHD_A" Name="高等级航道名称" Owner="GKZYData.1"/>
+			
+			<Layer Label="过江通道" ID="L_ID_JSY_GJTD" Name="V0716过江通道" Owner="GKZYData.2" Show="1"/>
+
+			
+			<Layer Label="盐城港高速标签" ID="L_ID_JSY_GSGL_YC_A" Name="V0703高速_YC" Owner="GKZYData.1"/>
+			<Layer Label="盐城港国道标签" ID="L_ID_JSY_GD_YC_A" Name="V0703国道_YC" Owner="GKZYData.1"/>
+			<Layer Label="盐城港省道标签" ID="L_ID_JSY_SD_YC_A" Name="V0703省道_YC" Owner="GKZYData.1"/>
+			<Layer Label="盐城港疏港公路标签" ID="L_ID_JSY_SGGL_YC_A" Name="V0703疏港公路_YC" Owner="GKZYData.1"/>
+			
+			<Layer Label="连云港港高速标签" ID="L_ID_JSY_GSGL_LYG_A" Name="V0703高速_LYG" Owner="GKZYData.1"/>
+			<Layer Label="连云港港国道标签" ID="L_ID_JSY_GD_LYG_A" Name="V0703国道_LYG" Owner="GKZYData.1"/>
+			<Layer Label="连云港港省道标签" ID="L_ID_JSY_SD_LYG_A" Name="V0703省道_LYG" Owner="GKZYData.1"/>
+			<Layer Label="连云港港疏港公路标签" ID="L_ID_JSY_SGGL_LYG_A" Name="V0703疏港公路_LYG" Owner="GKZYData.1"/>
+			
+			<Layer Label="南通港高速标签" ID="L_ID_JSY_GSGL_NT_A" Name="V0703高速_NT" Owner="GKZYData.1"/>
+			<Layer Label="南通港国道标签" ID="L_ID_JSY_GD_NT_A" Name="V0703国道_NT" Owner="GKZYData.1"/>
+			<Layer Label="南通港省道标签" ID="L_ID_JSY_SD_NT_A" Name="V0703省道_NT" Owner="GKZYData.1"/>
+			<Layer Label="南通港疏港公路标签" ID="L_ID_JSY_SGGL_NT_A" Name="V0703疏港公路_NT" Owner="GKZYData.1"/>
+			
+			<Layer Label="苏州港高速标签" ID="L_ID_JSY_GSGL_SZ_A" Name="V0703高速_SZ" Owner="GKZYData.1"/>
+			<Layer Label="苏州港国道标签" ID="L_ID_JSY_GD_SZ_A" Name="V0703国道_SZ" Owner="GKZYData.1"/>
+			<Layer Label="苏州港省道标签" ID="L_ID_JSY_SD_SZ_A" Name="V0703省道_SZ" Owner="GKZYData.1"/>
+			<Layer Label="苏州港疏港公路标签" ID="L_ID_JSY_SGGL_SZ_A" Name="V0703疏港公路_SZ" Owner="GKZYData.1"/>
+			
+			<Layer Label="泰州港高速标签" ID="L_ID_JSY_GSGL_TZ_A" Name="V0703高速_TZ" Owner="GKZYData.1"/>
+			<Layer Label="泰州港省道标签" ID="L_ID_JSY_SD_TZ_A" Name="V0703省道_TZ" Owner="GKZYData.1"/>
+			<Layer Label="泰州港疏港公路标签" ID="L_ID_JSY_SGGL_TZ_A" Name="V0703疏港公路_TZ" Owner="GKZYData.1"/>
+			
+			<Layer Label="扬州港高速标签" ID="L_ID_JSY_GSGL_YZ_A" Name="V0703高速_YZ" Owner="GKZYData.1"/>
+			<Layer Label="扬州港国道标签" ID="L_ID_JSY_GD_YZ_A" Name="V0703国道_YZ" Owner="GKZYData.1"/>
+			<Layer Label="扬州港省道标签" ID="L_ID_JSY_SD_YZ_A" Name="V0703省道_YZ" Owner="GKZYData.1"/>
+			<Layer Label="扬州港疏港公路标签" ID="L_ID_JSY_SGGL_YZ_A" Name="V0703疏港公路_YZ" Owner="GKZYData.1"/>
+			
+			<Layer Label="江阴(无锡)港高速标签" ID="L_ID_JSY_GSGL_JY_A" Name="V0703高速_JY" Owner="GKZYData.1"/>
+			<Layer Label="江阴(无锡)港省道标签" ID="L_ID_JSY_SD_JY_A" Name="V0703省道_JY" Owner="GKZYData.1"/>
+			<Layer Label="江阴(无锡)港疏港公路标签" ID="L_ID_JSY_SGGL_JY_A" Name="V0703疏港公路_JY" Owner="GKZYData.1"/>
+			
+			<Layer Label="常州港高速标签" ID="L_ID_JSY_GSGL_CZ_A" Name="V0703高速_CZ" Owner="GKZYData.1"/>
+			<Layer Label="常州港省道标签" ID="L_ID_JSY_SD_CZ_A" Name="V0703省道_CZ" Owner="GKZYData.1"/>
+			<Layer Label="常州港疏港公路标签" ID="L_ID_JSY_SGGL_CZ_A" Name="V0703疏港公路_CZ" Owner="GKZYData.1"/>
+			
+			<Layer Label="镇江港高速标签" ID="L_ID_JSY_GSGL_ZJ_A" Name="V0703高速_ZJ" Owner="GKZYData.1"/>
+			<Layer Label="镇江港国道标签" ID="L_ID_JSY_GD_ZJ_A" Name="V0703国道_ZJ" Owner="GKZYData.1"/>
+			<Layer Label="镇江港省道标签" ID="L_ID_JSY_SD_ZJ_A" Name="V0703省道_ZJ" Owner="GKZYData.1"/>
+			<Layer Label="镇江港疏港公路标签" ID="L_ID_JSY_SGGL_ZJ_A" Name="V0703疏港公路_ZJ" Owner="GKZYData.1"/>
+			
+			<Layer Label="南京港高速标签" ID="L_ID_JSY_GSGL_NJ_A" Name="V0703高速_NJ" Owner="GKZYData.1"/>
+			<Layer Label="南京港国道标签" ID="L_ID_JSY_GD_NJ_A" Name="V0703国道_NJ" Owner="GKZYData.1"/>
+			<Layer Label="南京港省道标签" ID="L_ID_JSY_SD_NJ_A" Name="V0703省道_NJ" Owner="GKZYData.1"/>
+			<Layer Label="南京港疏港公路标签" ID="L_ID_JSY_SGGL_NJ_A" Name="V0703疏港公路_NJ" Owner="GKZYData.1"/>
+		    
+			
+			<Layer Label="仅标识" ID="ID1" Name="港区文字0626_noNT" Owner="GKZYData.1" Show="1"/>  
+			<Layer Label="仅标识" ID="ID1_1" Name="港区文字0626_NT" Owner="GKZYData.1" Show="1"/> 
+			<Layer Label="仅标识" ID="ID1_0" Name="港区文字_一条线版" Owner="GKZYData.1" />   
+			<Layer Label="仅标识" ID="ID2" Name="作业区文字" Owner="GKZYData.1" Show="1"/>			
+			
+			<Layer Label="南京港规划镂空图层" ID="L_ID_GQGH_NJ_LK" Name="南京规划图" Owner="GKZYData" />  
+			<Layer Label="扬州港规划镂空图层" ID="L_ID_GQGH_YZ_LK" Name="扬州规划图" Owner="GKZYData" /> 
+            <Layer Label="泰州港规划镂空图层" ID="L_ID_GQGH_TZ_LK" Name="泰州规划图" Owner="GKZYData" /> 
+            <Layer Label="江阴港规划镂空图层" ID="L_ID_GQGH_JY_LK" Name="江阴规划图" Owner="GKZYData" /> 
+			<Layer Label="苏州港规划镂空图层" ID="L_ID_GQGH_SZ_LK" Name="苏州规划图" Owner="GKZYData" /> 
+            <Layer Label="镇江港规划镂空图层" ID="L_ID_GQGH_ZJ_LK" Name="镇江规划图" Owner="GKZYData" /> 
+           	<Layer Label="盐城港规划镂空图层" ID="L_ID_GQGH_YC_LK" Name="盐城规划图" Owner="GKZYData" /> 
+           	<Layer Label="连云港规划镂空图层" ID="L_ID_GQGH_LYG_LK" Name="连云港规划图" Owner="GKZYData" /> 
+           	
+			<Layer Label="南京港规划标注" ID="L_ID_GQGH_NJ_A" Name="南京规划图标注" Owner="GKZYData.1" />  
+			<Layer Label="南京港规划" ID="L_ID_GQGH_NJ" Name="南京规划图" Owner="GKZYData.1" /> 
+           	<Layer Label="扬州港规划标注" ID="L_ID_GQGH_YZ_A" Name="扬州规划图标注" Owner="GKZYData.1" /> 
+            <Layer Label="扬州港规划" ID="L_ID_GQGH_YZ" Name="扬州规划图" Owner="GKZYData.1" /> 
+			<Layer Label="泰州港规划标注" ID="L_ID_GQGH_TZ_A" Name="泰州规划图标注" Owner="GKZYData.1" /> 
+            <Layer Label="泰州港规划" ID="L_ID_GQGH_TZ" Name="泰州规划图" Owner="GKZYData.1" /> 
+			<Layer Label="江阴港规划标注" ID="L_ID_GQGH_JY_A" Name="江阴规划图标注" Owner="GKZYData.1" /> 
+            <Layer Label="江阴港规划" ID="L_ID_GQGH_JY" Name="江阴规划图" Owner="GKZYData.1" /> 
+			<Layer Label="苏州港规划标注" ID="L_ID_GQGH_SZ_A" Name="苏州规划图标注" Owner="GKZYData.1" /> 
+            <Layer Label="苏州港规划" ID="L_ID_GQGH_SZ" Name="苏州规划图" Owner="GKZYData.1" /> 
+			<Layer Label="镇江港规划标注" ID="L_ID_GQGH_ZJ_A" Name="镇江规划图标注" Owner="GKZYData.1" /> 
+            <Layer Label="镇江港规划" ID="L_ID_GQGH_ZJ" Name="镇江规划图" Owner="GKZYData.1" /> 
+			<Layer Label="盐城港规划标注" ID="L_ID_GQGH_YC_A" Name="盐城规划图标注" Owner="GKZYData.1" /> 
+            <Layer Label="盐城港规划" ID="L_ID_GQGH_YC" Name="盐城规划图" Owner="GKZYData.1" /> 
+			<Layer Label="连云港港规划标注" ID="L_ID_GQGH_LYG_A" Name="连云港规划图标注" Owner="GKZYData.1" /> 
+            <Layer Label="连云港港规划" ID="L_ID_GQGH_LYG" Name="连云港规划图" Owner="GKZYData.2" /> 
+						
+			<Layer Label="泊位标注" ID="L_ID_BW_1" Name="L_BW_PY" Owner="GKZYData.1" Show="1"/>       
+			<Layer Label="码头标注" ID="L_ID_MT_1" Name="L_MT_PY" Owner="GKZYData.1" />       
+			<Layer Label="港口经营人标注" ID="L_ID_GKJYR_1" Name="L_GKJYR_PY" Owner="GKZYData.1" Show="1"/> 
+			<Layer Label="港口经营人透明标注" ID="L_ID_GKJYR_11" Name="L_GKJYR_PY" Owner="GKZYData.3" />      
+			<Layer Label="锚地现状标注" ID="L_ID_MD_XZ_1" Name="L_MD_XZ_PY" Owner="GKZYData.1" />       
+			<Layer Label="锚地规划标注" ID="L_ID_MD_GH_1" Name="L_MD_GH_PY" Owner="GKZYData.1" />       
+			<Layer Label="港区标注" ID="L_ID_GQ_5" Name="L_GQ_PY" Owner="GKZYData.2" />
+			<Layer Label="摄像头" ID="L_ID_SP" Name="L_SP_PT" Owner="GKZYData"/>    
+			<Layer Label="港口" ID="L_ID_GK_PT" Name="港口_首页图标" Owner="GKZYData"/> 
+			<Layer Label="岸线现状" ID="L_ID_AX_XZ" Name="L_AX_XZ_PL" Owner="GKZYData"/>       
+			<Layer Label="泊位镂空图层" ID="L_ID_BW01" Name="L_BW_PY" Owner="GKZYData.2"/>       
+			<Layer Label="码头前沿镂空图层" ID="L_ID_MT01" Name="L_MT_PY" Owner="GKZYData.2"/>       
+			<Layer Label="锚地现状镂空图层" ID="L_ID_MD_XZ01" Name="L_MD_XZ_PY" Owner="GKZYData.2" />       
+			<Layer Label="锚地规划镂空图层" ID="L_ID_MD_GH01" Name="L_MD_GH_PY" Owner="GKZYData.2"/>     
+			<Layer Label="泊位" ID="L_ID_BW" Name="L_BW_PY" Owner="GKZYData" Show="1"/>       
+			<Layer Label="码头前沿" ID="L_ID_MT" Name="L_MT_PY" Owner="GKZYData" Show="1"/>       
+			<Layer Label="锚地现状" ID="L_ID_MD_XZ" Name="L_MD_XZ_PY" Owner="GKZYData" />       
+			<Layer Label="锚地" ID="L_ID_MD_GH" Name="L_MD_GH_PY" Owner="GKZYData"/> 
+			<Layer Label="港口经营人" ID="L_ID_GKJYR" Name="L_GKJYR_PY" Owner="GKZYData" Show="1"/> 
+			<Layer Label="港口经营人" ID="L_ID_GKJYR_2" Name="L_GKJYR_PY" Owner="GKZYData.2" Show="1"/>      
+			<Layer Label="作业区" ID="L_ID_ZYQ" Name="L_ZYQ_PY" Owner="GKZYData.2" Show="1"/>       
+			<Layer Label="港区" ID="L_ID_GQ" Name="L_GQ_PY" Owner="GKZYData.3" Show="1"/> 
+			<Layer Label="作业区" ID="L_ID_ZYQ_2" Name="L_ZYQ_PY" Owner="GKZYData.1" Show="1"/>   
+			<Layer Label="港区" ID="L_ID_GQ_2" Name="L_GQ_PY" Owner="GKZYData.1" Show="1"/> 
+			<Layer Label="港口区域" ID="L_ID_GK_PY" Name="L_GK_PY" Owner="GKZYData"/>      
+			<Layer Label="市界" ID="L_ID_SJ" Name="L_SJ_PY" Owner="GKZYData"/>     
+			<Layer Label="港口危险货物企业" ID="L_ID_AQ_WXHWQY" Name="L_GKZY_AQ_WXHWQY_PT" Owner="GKZYData"/>       
+			<Layer Label="应急物资库" ID="L_ID_AQ_YJWZK" Name="L_GKZY_AQ_YJWZK_PT" Owner="GKZYData"/>       
+			<Layer Label="港口危险化学品仓储设施" ID="L_ID_AQ_WHPCCSS" Name="L_GKZY_AQ_WHPCCSS_PT" Owner="GKZYData"/>       
+			<Layer Label="重大危险源企业" ID="L_ID_AQ_ZDWXYQY" Name="L_GKZY_AQ_ZDWXYQY_PT" Owner="GKZYData"/>       
+			<Layer Label="取水口" ID="L_ID_AQ_QSK" Name="L_GKZY_AQ_QSK_PT" Owner="GKZYData"/>  
+			<Layer Label="应急网络_消防" ID="L_ID_AQ_XF" Name="应急网络_消防" Owner="GKZYData"/>
+			<Layer Label="应急网络_交警" ID="L_ID_AQ_JJ" Name="应急网络_交警" Owner="GKZYData"/>
+			<Layer Label="取水口" ID="L_ID_AQ_QSK2" Name="取水口" Owner="GKZYData"/>
+			<Layer Label="应急网络_公安" ID="L_ID_AQ_GA" Name="应急网络_公安" Owner="GKZYData"/>
+			<Layer Label="医院药店" ID="L_ID_AQ_YY" Name="医院药店" Owner="GKZYData"/>
+		    <Layer Label="港口范围" ID="L_ID_GKFW" Name="港口范围" Owner="GKZYData"/> 
+		    <Layer Label="罐区" ID="L_ID_AQ_GQ" Name="罐区" Owner="GKZYData"/>
+		
+		    <Layer Label="南京港高速" ID="L_ID_JSY_GSGL_NJ" Name="高速0626" Owner="GKZYData"/>
+		    <Layer Label="镇江港高速" ID="L_ID_JSY_GSGL_ZJ" Name="高速0626" Owner="GKZYData.1"/>
+			<Layer Label="扬州港高速" ID="L_ID_JSY_GSGL_YZ" Name="V0703高速" Owner="GKZYData"/>
+		   	<Layer Label="泰州港高速" ID="L_ID_JSY_GSGL_TZ" Name="V0703高速" Owner="GKZYData.1"/>
+			<Layer Label="常州港高速" ID="L_ID_JSY_GSGL_CZ" Name="V0703高速" Owner="GKZYData.2"/>
+		    <Layer Label="江阴港高速" ID="L_ID_JSY_GSGL_JY" Name="V0703高速" Owner="GKZYData.3"/>
+			<Layer Label="苏州港高速" ID="L_ID_JSY_GSGL_SZ" Name="V0703高速" Owner="GKZYData.4"/>
+		    <Layer Label="南通港高速" ID="L_ID_JSY_GSGL_NT" Name="V0703高速" Owner="GKZYData.5"/>
+			<Layer Label="连云港港高速" ID="L_ID_JSY_GSGL_LYG" Name="V0703高速" Owner="GKZYData.6"/>
+		    <Layer Label="盐城港高速" ID="L_ID_JSY_GSGL_YC" Name="V0703高速" Owner="GKZYData.7"/>
+		    <Layer Label="高速" ID="L_ID_JSY_GSGL" Name="高速公路3" Owner="GKZYData"/>
+		    <Layer Label="南京港国道" ID="L_ID_JSY_GD_NJ" Name="国道0626" Owner="GKZYData"/>
+		    <Layer Label="镇江港国道" ID="L_ID_JSY_GD_ZJ" Name="国道0626" Owner="GKZYData.1"/>
+			<Layer Label="扬州港国道" ID="L_ID_JSY_GD_YZ" Name="V0703国道" Owner="GKZYData"/>
+
+			<Layer Label="苏州港国道" ID="L_ID_JSY_GD_SZ" Name="V0703国道" Owner="GKZYData.1"/>
+		    <Layer Label="南通港国道" ID="L_ID_JSY_GD_NT" Name="V0703国道" Owner="GKZYData.2"/>
+			<Layer Label="连云港港国道" ID="L_ID_JSY_GD_LYG" Name="V0703国道" Owner="GKZYData.3"/>
+		    <Layer Label="盐城港国道" ID="L_ID_JSY_GD_YC" Name="V0703国道" Owner="GKZYData.4"/>
+		    <Layer Label="国道" ID="L_ID_JSY_GD" Name="普通国道路段" Owner="GKZYData"/>
+		    <Layer Label="南京港省道" ID="L_ID_JSY_SD_NJ" Name="省道0626" Owner="GKZYData.1"/>
+		    <Layer Label="镇江港省道" ID="L_ID_JSY_SD_ZJ" Name="省道0626" Owner="GKZYData"/>
+			<Layer Label="扬州港省道" ID="L_ID_JSY_SD_YZ" Name="V0703省道" Owner="GKZYData"/>
+		   	<Layer Label="泰州港省道" ID="L_ID_JSY_SD_TZ" Name="V0703省道" Owner="GKZYData.1"/>
+			<Layer Label="常州港省道" ID="L_ID_JSY_SD_CZ" Name="V0703省道" Owner="GKZYData.2"/>
+		    <Layer Label="江阴港省道" ID="L_ID_JSY_SD_JY" Name="V0703省道" Owner="GKZYData.3"/>
+			<Layer Label="苏州港省道" ID="L_ID_JSY_SD_SZ" Name="V0703省道" Owner="GKZYData.4"/>
+		    <Layer Label="南通港省道" ID="L_ID_JSY_SD_NT" Name="V0703省道" Owner="GKZYData.5"/>
+			<Layer Label="连云港港省道" ID="L_ID_JSY_SD_LYG" Name="V0703省道" Owner="GKZYData.6"/>
+		    <Layer Label="盐城港省道" ID="L_ID_JSY_SD_YC" Name="V0703省道" Owner="GKZYData.7"/>
+		    <Layer Label="省道" ID="L_ID_JSY_SD" Name="普通省道路段" Owner="GKZYData"/>
+		    <Layer Label="南京港疏港公路" ID="L_ID_JSY_SGGL_NJ" Name="疏港公路0626" Owner="GKZYData.1"/>
+		    <Layer Label="镇江港疏港公路" ID="L_ID_JSY_SGGL_ZJ" Name="疏港公路0626" Owner="GKZYData"/>
+			<Layer Label="扬州港疏港公路" ID="L_ID_JSY_SGGL_YZ" Name="V0703疏港公路" Owner="GKZYData"/>
+		   	<Layer Label="泰州港疏港公路" ID="L_ID_JSY_SGGL_TZ" Name="V0703疏港公路" Owner="GKZYData.1"/>
+			<Layer Label="常州港疏港公路" ID="L_ID_JSY_SGGL_CZ" Name="V0703疏港公路" Owner="GKZYData.2"/>
+		    <Layer Label="江阴港疏港公路" ID="L_ID_JSY_SGGL_JY" Name="V0703疏港公路" Owner="GKZYData.3"/>
+			<Layer Label="苏州港疏港公路" ID="L_ID_JSY_SGGL_SZ" Name="V0703疏港公路" Owner="GKZYData.4"/>
+		    <Layer Label="南通港疏港公路" ID="L_ID_JSY_SGGL_NT" Name="V0703疏港公路" Owner="GKZYData.5"/>
+			<Layer Label="连云港港疏港公路" ID="L_ID_JSY_SGGL_LYG" Name="V0703疏港公路" Owner="GKZYData.6"/>
+		    <Layer Label="盐城港疏港公路" ID="L_ID_JSY_SGGL_YC" Name="V0703疏港公路" Owner="GKZYData.7"/>
+		    <Layer Label="疏港公路" ID="L_ID_JSY_SGGL" Name="疏港公路" Owner="GKZYData"/>			
+			<Layer Label="南京港铁路" ID="L_ID_JSY_TL_NJ" Name="铁路0626" Owner="GKZYData.1"/>
+			<Layer Label="镇江港铁路" ID="L_ID_JSY_TL_ZJ" Name="铁路0626" Owner="GKZYData"/>
+			<Layer Label="扬州港铁路" ID="L_ID_JSY_TL_YZ" Name="V0703铁路" Owner="GKZYData"/>
+			<Layer Label="泰州港铁路" ID="L_ID_JSY_TL_TZ" Name="V0703铁路" Owner="GKZYData.1"/>
+
+			<Layer Label="江阴港铁路" ID="L_ID_JSY_TL_JY" Name="V0703铁路" Owner="GKZYData.2"/>
+
+			<Layer Label="南通港铁路" ID="L_ID_JSY_TL_NT" Name="V0703铁路" Owner="GKZYData.3"/>
+
+		    <Layer Label="铁路" ID="L_ID_JSY_TL" Name="沿江铁路" Owner="GKZYData"/>
+		    <Layer Label="高等级航道" ID="L_ID_JSY_GHD" Name="T3级以上航道L" Owner="GKZYData"/>
+		    <Layer Label="管道" ID="L_ID_JSY_GUAND" Name="管道0626" Owner="GKZYData"/>
+			<Layer Label="港口名称点" ID="L_ID_GK_PT1" Name="港名称" Owner="GKZYData"/>
+			
+			<Layer Label="应急网络_边防" ID="L_ID_AQ_BF" Name="L_AQ_BF" Owner="GKZYData"/>
+			<Layer Label="应急网络_环保" ID="L_ID_AQ_HB" Name="L_AQ_HB" Owner="GKZYData"/>
+			<Layer Label="应急网络_搜救中心" ID="L_ID_AQ_SJZX" Name="L_AQ_SJZX" Owner="GKZYData"/>
+		</Service>
+	</MapServices>
+	<DataServices>
+		<Service Label="港口资源" ID="DATA_SERVICE_GKZY" URL="http://${serverName}:${port}/iserver/services/data-GKZY/rest/data">
+			<Layer Label="泊位" ID="L_ID_BW" Name="L_BW_PY" Owner="GKZYData"/>
+			<Layer Label="岸线现状" ID="L_ID_AX_XZ" Name="L_AX_XZ_PL" Owner="GKZYData"/> 
+			<Layer Label="港区" ID="L_ID_GQ" Name="L_GQ_PY" Owner="GKZYData"/>    
+			<Layer Label="港口区域" ID="L_ID_GK_PY" Name="L_GK_PY" Owner="GKZYData"/>      
+			<Layer Label="市界" ID="L_ID_SJ" Name="L_SJ_PY" Owner="GKZYData"/>       
+			<Layer Label="锚地现状" ID="L_ID_MD_XZ" Name="L_MD_XZ_PY" Owner="GKZYData"/>     
+			<Layer Label="锚地" ID="L_ID_MD_GH" Name="L_MD_GH_PY" Owner="GKZYData"/> 
+			<Layer Label="港口经营人" ID="L_ID_GKJYR" Name="L_GKJYR_PY" Owner="GKZYData"/>      
+			<Layer Label="码头前沿" ID="L_ID_MT" Name="L_MT_PY" Owner="GKZYData"/>      
+			<Layer Label="作业区" ID="L_ID_ZYQ" Name="L_ZYQ_PY" Owner="GKZYData"/>      
+			<Layer Label="岸线现状临时层" ID="L_ID_AX_XZ_TMP" Name="L_AX_XZ_PL_TMP" Owner="GKZYData"/> 
+			<Layer Label="码头前沿临时层" ID="L_ID_MT_TMP" Name="L_MT_PY_TMP" Owner="GKZYData"/> 
+			<Layer Label="泊位临时层" ID="L_ID_BW_TMP" Name="L_BW_PY_TMP" Owner="GKZYData"/> 
+			<Layer Label="锚地现状临时层" ID="L_ID_MD_XZ_TMP" Name="L_MD_XZ_PY_TMP" Owner="GKZYData"/> 
+			<Layer Label="作业区临时层" ID="L_ZYQ_PY_TMP" Name="L_ZYQ_PY_TMP" Owner="GKZYData"/> 
+			<Layer Label="港区临时层" ID="L_GQ_PY_TMP" Name="L_GQ_PY_TMP" Owner="GKZYData"/> 
+			<Layer Label="锚地规划临时层" ID="L_MD_GH_PY_TMP" Name="L_MD_GH_PY_TMP" Owner="GKZYData"/> 
+			<Layer Label="经营人临时图层" ID="L_GKJYR_PY_TMP" Name="L_GKJYR_PY_TMP" Owner="GKZYData"/> 
+			
+			
+			<Layer Label="港口危险化学品仓储设施" ID="L_ID_AQ_WHPCCSS" Name="L_GKZY_AQ_WHPCCSS_PT" Owner="GKZYData"/> 
+			<Layer Label="港口危险货物企业" ID="L_ID_AQ_WXHWQY" Name="L_GKZY_AQ_WXHWQY_PT" Owner="GKZYData"/> 
+			<Layer Label="取水口" ID="L_ID_AQ_QSK" Name="L_GKZY_AQ_QSK_PT" Owner="GKZYData"/> 
+			<Layer Label="应急物资库" ID="L_ID_AQ_YJWZK" Name="L_GKZY_AQ_YJWZK_PT" Owner="GKZYData"/> 
+			<Layer Label="重大危险源企业" ID="L_ID_AQ_ZDWXYQY" Name="L_GKZY_AQ_ZDWXYQY_PT" Owner="GKZYData"/> 
+		</Service>
+	</DataServices>
+	<AnalystServices>
+		<Service Label="港口资源" ID="ANALYST_SERVICE_GKZY" URL="http://${serverName}:${port}/iserver/services/spatialAnalysis-GKZY/restjsr/spatialanalyst">
+		</Service>
+	</AnalystServices>
+</Root>

+ 21 - 0
gkaq/gis-flex/trunk/src/com/config/MenuConfig.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<node CDID="M_SYS" CDMC="港口资源系统菜单" CDMS="根节点" CDXH="0" CJSJ="null" ID="1" SJCDID="-1" STATE="0">
+    <node CDID="M_AQXT" CDMC="安全系统" CDTB="" CDMS="null" CDXH="1" CJSJ="null" ID="281e1e57-a443-4d11-92ff-2483ffb41505" SJCDID="5eaa0b0f-849c-4301-b076-b7270d4ffb9c" STATE="0">
+      <node CDID="ALL" CDMC="全部" CDTB="" CDMS="null" CDXH="1" CJSJ="null" ID="e0413fe6-6dad-4e10-b465-9285bc43c203" SJCDID="281e1e57-a443-4d11-92ff-2483ffb41505" STATE="0"/>
+      <node CDID="L_ID_AQ_WHPCCSS" CDMC="港口危险化学品仓储设施" CDTB="images/png/aq_whpccss.png" CDMS="null" CDXH="1" CJSJ="null" ID="e0413fe6-6dad-4e10-b465-9285bc43c203" SJCDID="281e1e57-a443-4d11-92ff-2483ffb41505" STATE="0"/>
+      <node CDID="L_ID_AQ_WXHWQY" CDMC="港口危险货物企业" CDTB="images/png/aq_wxhwqy.png" CDMS="null" CDXH="2" CJSJ="null" ID="0f75f453-4317-4940-bc0b-120ba3b94039" SJCDID="281e1e57-a443-4d11-92ff-2483ffb41505" STATE="0"/>
+      <node CDID="L_ID_AQ_QSK" CDMC="取水口" CDTB="images/png/aq_qsk.png" CDMS="null" CDXH="3" CJSJ="null" ID="4744c601-bbe0-4664-b1fa-74e016cb82e2" SJCDID="281e1e57-a443-4d11-92ff-2483ffb41505" STATE="0"/>
+      <node CDID="L_ID_AQ_YJWZK" CDMC="应急物资库" CDTB="images/png/aq_yywzk.png" CDMS="null" CDXH="4" CJSJ="null" ID="55448a54-e5ad-4a27-96e7-651edf33f0e9" SJCDID="281e1e57-a443-4d11-92ff-2483ffb41505" STATE="0"/>
+      <node CDID="L_ID_AQ_ZDWXYQY" CDMC="重大危险源企业" CDTB="images/png/aq_zdwxy.gif" CDMS="null" CDXH="5" CJSJ="null" ID="0717a6fb-d965-4b43-8fd8-96d32069dd5a" SJCDID="281e1e57-a443-4d11-92ff-2483ffb41505" STATE="0"/>
+      <node CDID="L_ID_AQ_XF" CDMC="消防" CDTB="images/png/aq_xf.png" CDMS="null" CDXH="6" CJSJ="null" ID="0717a6fb-d965-4b43-8fd8-96d32069dd5b" SJCDID="281e1e57-a443-4d11-92ff-2483ffb41506" STATE="0"/>
+      <node CDID="L_ID_AQ_YY" CDMC="医院" CDTB="images/png/aq_yy.png" CDMS="null" CDXH="6" CJSJ="null" ID="0717a6fb-d965-4b43-8fd8-96d32069dd5c" SJCDID="281e1e57-a443-4d11-92ff-2483ffb41507" STATE="0"/>
+      <node CDID="L_ID_AQ_JJ" CDMC="交警" CDTB="images/png/aq_jj.png" CDMS="null" CDXH="6" CJSJ="null" ID="0717a6fb-d965-4b43-8fd8-96d32069dd5d" SJCDID="281e1e57-a443-4d11-92ff-2483ffb41508" STATE="0"/>
+      <node CDID="L_ID_AQ_GA" CDMC="公安" CDTB="images/png/aq_ga.png" CDMS="null" CDXH="6" CJSJ="null" ID="0717a6fb-d965-4b43-8fd8-96d32069dd5e" SJCDID="281e1e57-a443-4d11-92ff-2483ffb41509" STATE="0"/>
+      <node CDID="L_ID_AQ_BF" CDMC="边防" CDTB="images/png/aq_bf.png" CDMS="null" CDXH="6" CJSJ="null" ID="0717a6fb-d965-4b43-8fd8-96d32169dd5e" SJCDID="281e1e57-a443-4d11-92ff-2483ffb42501" STATE="0"/>
+      <node CDID="L_ID_AQ_HB" CDMC="环保" CDTB="images/png/aq_hb.png" CDMS="null" CDXH="6" CJSJ="null" ID="0717a6fb-d965-4b43-8fd8-96d32169dd6e" SJCDID="281e1e57-a443-4d11-92ff-2483ffb42502" STATE="0"/>
+      <node CDID="L_ID_AQ_SJZX" CDMC="搜救中心" CDTB="images/png/aq_sjzx.png" CDMS="null" CDXH="6" CJSJ="null" ID="0717a6fb-d965-4b43-8fd8-96d32169dd7e" SJCDID="281e1e57-a443-4d11-92ff-2483ffb42503" STATE="0"/>
+      <node CDID="L_ID_AQ_GQ" CDMC="罐区" CDTB="images/png/aq_gq.png" CDMS="null" CDXH="6" CJSJ="null" ID="0717a6fb-d965-4b43-8fd8-96d32069dd5f" SJCDID="281e1e57-a443-4d11-92ff-2483ffb41510" STATE="0"/>
+      <node CDID="L_ID_BW" CDMC="泊位" CDTB="images/png/aq_bw.png" CDMS="null" CDXH="6" CJSJ="null" ID="0717a6fb-d965-4b43-8fd8-96d32069dd5g" SJCDID="281e1e57-a443-4d11-92ff-2483ffb41511" STATE="0"/>
+      <node CDID="L_ID_SP" CDMC="摄像头" CDTB="images/png/aq_sxt.png" CDMS="null" CDXH="6" CJSJ="null" ID="0717a6fb-d965-4b43-8fd8-96d32069dd5g" SJCDID="281e1e57-a443-4d11-92ff-2483ffb41511" STATE="0"/>
+    </node>
+</node>

+ 31 - 0
gkaq/gis-flex/trunk/src/com/events/DataConfigEvent.as

@@ -0,0 +1,31 @@
+package com.events
+{
+	import com.supermap.framework.events.BaseEvent;
+	
+	public class DataConfigEvent extends BaseEvent
+	{
+		/**
+		 * 定义当配置文件载入时,ConfigDataEvent事件对象的type属性。
+		 */		
+		public static const MAPCONFIG_LOAD:String	= "mapConfigLoad";
+		
+		public static const MENUCONFIG_LOAD:String	= "menuConfigLoad";
+		
+		public static const CONFIG_LOAD_ERROR:String = "configLoadError";
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+		/**
+		 * 处理配置文件数据时,都会将 ConfigDataEvent 对象分派到事件流中。
+		 * @param type 定义事件类型。
+		 * @param data 定义事件信息。
+		 */ 		
+		public function DataConfigEvent(type:String,  data:Object=null)
+		{
+			super(type);
+			if (data != null) _data = data;
+		}
+	}
+}

+ 19 - 0
gkaq/gis-flex/trunk/src/com/events/MenusEvent.as

@@ -0,0 +1,19 @@
+package com.events
+{
+	import com.supermap.framework.events.BaseEvent;
+	
+	public class MenusEvent extends BaseEvent
+	{
+		public static const MENUHIDE:String = "menuhide";
+		
+		public static const MENUOVER:String = "menuover";
+		
+		public function MenusEvent(type:String,  data:Object=null)
+		{
+			super(type);
+			if (data != null) _data = data;
+		}
+		
+		
+	}
+}

+ 79 - 0
gkaq/gis-flex/trunk/src/com/main/MapOperateModel.mxml

@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		  xmlns:s="library://ns.adobe.com/flex/spark" 
+		  xmlns:mx="library://ns.adobe.com/flex/mx"
+		  creationComplete="initApp()">
+	<fx:Declarations>
+		<!-- 将非可视元素(例如服务、值对象)放在此处 -->
+	</fx:Declarations>
+	<fx:Script>
+		<![CDATA[
+			import com.supermap.web.actions.Pan;
+			
+			import mx.controls.Alert;
+			
+			import com.supermap.web.actions.ZoomIn;
+			import com.supermap.web.actions.ZoomOut;
+			import com.supermap.web.components.MapHistoryManager;
+			import com.supermap.web.mapping.Map;
+			
+			import mx.core.FlexGlobals;
+
+			
+			private var map:Map;
+			
+			private function initApp():void
+			{
+				map = map = FlexGlobals.topLevelApplication.getMap();
+			} 
+			//清除
+			protected function clearAll(event:MouseEvent):void
+			{
+				FlexGlobals.topLevelApplication.clearAllTempLayer();
+			}
+			private function btnClick(event:MouseEvent):void
+			{
+				if(!map)
+					map = FlexGlobals.topLevelApplication.getMap();
+				var uid:String = event.currentTarget.uid;
+				switch(uid)
+				{
+					case "pan":
+					{
+						map.action = new Pan(map);
+						break;
+					}
+					case "zoonIn":
+					{
+						map.action = new ZoomIn(map);
+						break;
+					}
+					case "zoomOut":
+					{
+						map.action = new ZoomOut(map);
+						break;
+					}
+					case "entire":
+					{
+						map.viewEntire();
+						break;
+					}
+				}
+			}
+		]]>
+	</fx:Script>
+	<s:SkinnableContainer id="scaleBar">
+		<s:layout>
+			<s:VerticalLayout gap="5" />
+		</s:layout> 
+		<s:SkinnableContainer > 
+			<s:HGroup gap="10" horizontalCenter="0" verticalCenter="0">
+				<s:Button width="30" height="30" useHandCursor="true" buttonMode="true" uid="pan" toolTip="平移"  skinClass="com.skins.ButtonRectImgSkin" accessibilityDescription="images/map/translation.png" click="btnClick(event)"/>
+				<s:Button width="30" height="30" useHandCursor="true" buttonMode="true" uid="zoonIn" toolTip="拉框放大" skinClass="com.skins.ButtonRectImgSkin" accessibilityDescription="images/map/zoomin.png" click="btnClick(event)"/>   
+				<s:Button width="30" height="30" useHandCursor="true" buttonMode="true" uid="zoomOut" toolTip="拉框缩小" skinClass="com.skins.ButtonRectImgSkin" accessibilityDescription="images/map/zoomout.png" click="btnClick(event)"/>
+				<s:Button width="30" height="30" useHandCursor="true" buttonMode="true" toolTip="清除" skinClass="com.skins.ButtonRectImgSkin" accessibilityDescription="images/map/clear1.png" click="clearAll(event)"/>
+				<s:Button width="30" height="30" useHandCursor="true" buttonMode="true" uid="entire" toolTip="全幅显示" skinClass="com.skins.ButtonRectImgSkin" accessibilityDescription="images/map/viewEntire.png" click="btnClick(event)"/>
+				</s:HGroup>
+		</s:SkinnableContainer>
+	</s:SkinnableContainer>
+</s:Module>

+ 202 - 0
gkaq/gis-flex/trunk/src/com/main/bufferAnalyst.as

@@ -0,0 +1,202 @@
+import com.common.ConfigUtil;
+import com.common.ConstUtil;
+import com.server.QueryAction;
+import com.supermap.web.core.Feature;
+import com.supermap.web.core.Point2D;
+import com.supermap.web.core.Rectangle2D;
+import com.supermap.web.core.geometry.GeoPoint;
+import com.supermap.web.core.geometry.GeoRegion;
+import com.supermap.web.core.styles.PictureMarkerStyle;
+import com.supermap.web.core.styles.PredefinedFillStyle;
+import com.supermap.web.iServerJava6R.FilterParameter;
+import com.supermap.web.iServerJava6R.Recordset;
+import com.supermap.web.iServerJava6R.queryServices.QueryBySQLParameters;
+import com.supermap.web.iServerJava6R.queryServices.QueryBySQLService;
+import com.supermap.web.iServerJava6R.queryServices.QueryResult;
+import com.supermap.web.iServerJava6R.spatialAnalystServices.BufferDistance;
+import com.supermap.web.iServerJava6R.spatialAnalystServices.BufferEndType;
+import com.supermap.web.iServerJava6R.spatialAnalystServices.BufferSetting;
+import com.supermap.web.iServerJava6R.spatialAnalystServices.DatasetBufferAnalystParameters;
+import com.supermap.web.iServerJava6R.spatialAnalystServices.DatasetBufferAnalystResult;
+import com.supermap.web.iServerJava6R.spatialAnalystServices.DatasetBufferAnalystService;
+import com.utils.ServicesUtility;
+
+import flash.events.MouseEvent;
+
+import mx.collections.ArrayCollection;
+import mx.controls.Alert;
+import mx.rpc.AsyncResponder;
+import mx.rpc.events.ResultEvent;
+
+
+private var idArr:ArrayCollection = new ArrayCollection();
+
+/**
+ * 缓冲区查询
+ * 
+ * WJL
+ * 
+ * 2014-05-21
+ * */
+public function bufferQuery(layerId:String,recordId:String,layerIdArr:ArrayCollection,r:Number):void
+{
+	this.idArr = layerIdArr;
+	//缓冲距离
+	var bufferDistance:BufferDistance = new BufferDistance();
+	bufferDistance.value = r * 1000;
+	
+	//定义缓冲区分析通用参数
+	var bufferSetting:BufferSetting = new BufferSetting();
+	bufferSetting.leftDistance = bufferDistance;
+	bufferSetting.endType = BufferEndType.ROUND; 
+	bufferSetting.semicircleLineSegment = 12;
+	
+	//缓冲过滤条件
+	var filterParameter:FilterParameter = new FilterParameter();
+	filterParameter.attributeFilter = "ID='" +  recordId + "'";
+
+	//数据集缓冲区分析参数设置
+	var datasetBufferAnalystParameters:DatasetBufferAnalystParameters = new DatasetBufferAnalystParameters();
+	datasetBufferAnalystParameters.bufferSetting = bufferSetting;
+	datasetBufferAnalystParameters.filterQueryParameter = filterParameter;
+	datasetBufferAnalystParameters.dataset = ConfigUtil.getMapLayerNameAndOwner(layerId);
+
+	var datasetBufferService:DatasetBufferAnalystService = new DatasetBufferAnalystService(ServicesUtility.getAnalystServiceUrl());
+	datasetBufferService.processAsync(datasetBufferAnalystParameters, new AsyncResponder(processCompleted, excuteErros, null));
+}
+
+
+
+//分析成功时调用的处理函数
+private function processCompleted(result:DatasetBufferAnalystResult, mark:Object = null):void
+{
+	this.baseFLayer.clear();
+	if(result.recordset && result.recordset.features.length != 0)
+	{
+		var query:QueryAction;
+		for each(var feature:Feature in result.recordset.features)
+		{
+			feature.style = new PredefinedFillStyle(PredefinedFillStyle.SYMBOL_SOLID, 0x0099ff, 0.3);
+			this.baseFLayer.addFeature(feature);
+			
+			this.map.viewBounds = feature.geometry.bounds.expand(1.2);
+			for each(var id:String in this.idArr)
+			{
+				query = new QueryAction();
+				query.spatialQueryLayer(id,QueryLayerEvent.QUERY_SUCCESS,feature.geometry);
+			}
+			
+			break;
+		}
+
+	}
+}
+
+//分析失败时调用的处理函数
+private function excuteErros(object:Object, mark:Object = null):void
+{
+	Alert.show("缓冲区分析失败:" + object.message,null,4,this);
+}
+
+private var locationLayerId:String = "";
+private var locationScale:Number = 175000;
+/**
+ * 定位
+ * 
+ * WJL
+ * 
+ * 2014-05-22
+ * 
+ * 参数:layerId:图层ID;where:条件(如:"ID = '321'")
+ * setDom:是否设置图层类型,默认根据showDom参数设置,传入false时不改变地图类型
+ * */
+public function location(layerId:String,where:String,scale:Number = 175000,showDom:Boolean = false,setDom:Boolean = true):void
+{
+	locationLayerId = layerId;
+	if(scale > 0)
+		locationScale = scale;
+	var layerName:String = ConfigUtil.getMapLayerNameAndOwner(layerId);
+	var url:String = ConfigUtil.getMapUrl(layerId);
+	
+	var queryBySQLParam:QueryBySQLParameters = new QueryBySQLParameters();
+	var filter:FilterParameter = new FilterParameter();
+	if(layerName.indexOf(",") > 0)
+		layerName = layerName.split(",")[0];
+	filter.name = layerName;
+	filter.attributeFilter = where;
+	queryBySQLParam.filterParameters = [filter];
+	queryBySQLParam.returnContent = true;
+	
+	var queryByDistanceService:QueryBySQLService = new QueryBySQLService(url);
+	queryByDistanceService.processAsync(queryBySQLParam, new AsyncResponder(handlerResult, 
+		function (object:Object, mark:Object = null):void
+		{
+			Alert.show("与服务端交互失败", "抱歉");
+		}, null));
+	if(setDom)
+	{
+		setMapStatus(showDom);
+	}
+}
+
+private function handlerResult(queryResult:QueryResult, mark:Object = null):void
+{
+	var recordSets:Array = queryResult.recordsets;
+	if(!recordSets || recordSets.length == 0)
+		return;
+	for each(var recordSet:Recordset in recordSets)
+	{
+		if(!recordSet.features || recordSet.features.length == 0)
+		{
+			Alert.show("当前图层查询结果为空");
+			return;
+		}
+		for each (var fea:Feature in recordSet.features)
+		{
+			if(fea.geometry is GeoPoint)
+			{
+				var markerStyle:PictureMarkerStyle = new PictureMarkerStyle();
+				markerStyle.source = featureStyle[locationLayerId].toString();
+				fea.style = markerStyle;
+			}
+			fea.name = locationLayerId;
+			fea.useHandCursor = true;
+			fea.mouseChildren = false;
+			fea.buttonMode = true;
+			fea.addEventListener(MouseEvent.CLICK,featureClick);
+			this.fLayer.addFeature(fea);
+			if(fea.geometry is GeoPoint)
+			{
+				var p:GeoPoint = fea.geometry as GeoPoint;
+				//this.map.zoomToResolution(0.00020707185454296173,new Point2D(p.x,p.y));
+				this.map.zoomToScale(1 / this.locationScale,new Point2D(p.x,p.y));
+			}
+			else if(fea.geometry is GeoRegion)
+			{
+				var gr:GeoRegion = fea.geometry as GeoRegion;
+				this.map.zoomToScale(1 / this.locationScale,gr.center);
+			}
+			fea.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
+			return;
+		}
+	}
+}
+
+private function setMapStatus(showDom:Boolean = false):void
+{
+	if(showDom)
+		mapIcon_clickHandler(null,"dom");
+	else
+		mapIcon_clickHandler(null,"layer");
+}
+private function test(event:MouseEvent):void
+{
+	var arr:ArrayCollection = new ArrayCollection();
+	arr.addItem(ConstUtil.L_ID_AQ_WHPCCSS);
+	arr.addItem(ConstUtil.L_ID_AQ_WXHWQY);
+	arr.addItem(ConstUtil.L_ID_AQ_XF);
+	arr.addItem(ConstUtil.L_ID_AQ_YJWZK);
+	bufferQuery(ConstUtil.L_ID_AQ_QSK,"34",arr,20);
+	//location(ConstUtil.L_ID_AQ_QSK,"SMID = 10",0,true);
+	//Alert.show(""+(1/this.map.scale));
+}

+ 248 - 0
gkaq/gis-flex/trunk/src/com/main/infoWindowHandle.as

@@ -0,0 +1,248 @@
+import com.common.ConstUtil;
+import com.supermap.web.core.Feature;
+import com.supermap.web.mapping.Map;
+import com.utils.CommonUtility;
+import com.view.Bw;
+import com.view.Ccss;
+import com.view.Cg;
+import com.view.QskGrid;
+import com.view.Whqy;
+import com.view.Yjwl;
+import com.view.YjwzGrid;
+import com.view.YjwzWindow;
+
+import flash.display.DisplayObject;
+
+import mx.collections.ArrayCollection;
+import mx.containers.Grid;
+import mx.controls.Alert;
+import mx.core.FlexGlobals;
+import mx.core.UIComponent;
+import mx.events.CloseEvent;
+import mx.managers.PopUpManager;
+import mx.resources.IResourceManager;
+import mx.resources.ResourceManager;
+import mx.rpc.events.ResultEvent;
+
+import spark.components.TitleWindow;
+
+private var ccss:Ccss=new Ccss;
+private var qskGrid:QskGrid=new QskGrid;
+private var whqy:Whqy=new Whqy;
+private var yjwzGrid:YjwzGrid=new YjwzGrid;
+private var yjwzWin:YjwzWindow  = new YjwzWindow;
+// 应急网络
+private var yjwl:Yjwl = new Yjwl;
+// 储罐
+private var cg:Cg = new Cg;
+// 泊位
+private var bw:Bw  = new Bw;
+
+private var jyrId:String="";
+private var currFea:Feature;
+private function showInfoGrid(fea:Feature):void{
+	this.currFea = fea;
+	var id:String  = fea.attributes.ID;
+	var name:String = fea.name;
+	var attrs:Object = fea.attributes;
+	this.map.infoWindow.content=getInfoWinGrid(id,name,attrs);
+}
+private function getInfoWinGrid(id:String,name:String,attrs:Object):UIComponent
+{
+	jyrId=id;
+	if(ConstUtil.L_ID_AQ_WHPCCSS==name){
+		ccss.recordId=id;
+		CommonUtility.callRemote("gisController","ccss",Yjpt_resultHandler,id);
+		return ccss;
+	}
+	else if(ConstUtil.L_ID_AQ_WXHWQY==name){
+		CommonUtility.callRemote("gisController","whqy",Yjpt_resultHandler,id);
+		whqy.recordId = id;
+		// 半径五公里资料搜索点
+		FlexGlobals.topLevelApplication.toolsCt.currId = id;
+		return whqy;
+	}
+	else if(ConstUtil.L_ID_AQ_QSK==name){
+		CommonUtility.callRemote("gisController","qsk",Yjpt_resultHandler,id);
+		return qskGrid;
+	}
+	else if(ConstUtil.L_ID_BW_AQ==name){
+//		detailCt.show = false;
+		bw.smid = attrs.ID;
+		CommonUtility.callRemote("gisController","searchBw",Yjpt_resultHandler,attrs.ID);
+		return bw;
+	}
+	else if(ConstUtil.L_ID_AQ_YJWZK==name){
+		CommonUtility.callRemote("gisController","yjwz_dw",Yjpt_resultHandler,id);
+		return yjwzGrid;
+	}
+	else if(ConstUtil.L_ID_AQ_ZDWXYQY==name){
+		ccss.recordId=id;
+		CommonUtility.callRemote("gisController","ccss",Yjpt_resultHandler,id);
+		return ccss;
+	}
+	else if(ConstUtil.L_ID_AQ_GQ==name){
+		cg.jyrmc=attrs.JYRMC;
+		cg.gqmc=attrs.GQMC;
+		CommonUtility.callRemote("gisController","searchCg",Yjpt_resultHandler,attrs.JYR,attrs.GQMC);
+		return cg;
+	}
+	else if(ConstUtil.L_ID_AQ_XF==name||ConstUtil.L_ID_AQ_YY==name||ConstUtil.L_ID_AQ_JJ==name||ConstUtil.L_ID_AQ_GA==name
+		||ConstUtil.L_ID_AQ_BF==name||ConstUtil.L_ID_AQ_HB==name||ConstUtil.L_ID_AQ_SJZX==name){
+		CommonUtility.callRemote("gisController","yjwl",Yjpt_resultHandler,id);
+		return yjwl;
+	}
+	return new Grid();
+}
+
+protected var rm:IResourceManager = ResourceManager.getInstance();
+protected function Yjpt_resultHandler(event:ResultEvent):void
+{
+	var qy:Object= null;
+   if("qsk"==event.token.message["operation"]){
+		var list:ArrayCollection=event.result as ArrayCollection;
+		qskGrid.list=list;
+		this.map.infoWindow.show(currFea.geometry.center); 
+	}
+	else if("whqy"==event.token.message["operation"]){
+		qy=event.result;
+		if(null != qy){
+			whqy.gqmc=qy["GQMC"];
+			whqy.gkjyr=qy["GKJYR"];
+			whqy.bwmc=qy["BWMC"];
+			whqy.hckpnl=qy["HCKPNL"];
+			whqy.ttl=qy["TTL"];
+			whqy.mtmc=qy["MTMC"];
+			whqy.zyhz=qy["ZYHZ"];
+			whqy.aqfzrlxdh=qy["AQFZRLXDH"];
+			whqy.gkjyxkzh=qy["GKJYXKZH"];
+			whqy.zyfzbh=qy["ZYFZBH"];
+		}else{
+			whqy.gqmc="";
+			whqy.gkjyr="";
+			whqy.bwmc="";
+			whqy.hckpnl="";
+			whqy.ttl="";
+			whqy.mtmc="";
+			whqy.zyhz="";
+			whqy.aqfzrlxdh="";
+			whqy.gkjyxkzh="";
+			whqy.zyfzbh="";
+		}
+		this.map.infoWindow.show(currFea.geometry.center); 
+	}
+	else if("ccss"==event.token.message["operation"]){
+		qy=event.result;
+		if(null !=qy){
+			ccss.gqmc=qy["GQMC"];
+			ccss.gkjyr=qy["GKJYR"];
+			ccss.rj=qy["RJ"];
+			ccss.cg=qy["CG"];
+			ccss.gs=qy["GS"];
+			ccss.wxygs=qy["WXYGS"];
+			ccss.zyhz=qy["ZYHZ"];
+			ccss.aqfzrlxdh=qy["AQFZRLXDH"];
+			ccss.gkjyxkzh=qy["GKJYXKZH"];
+			ccss.zyfzbh=qy["ZYFZBH"];
+		}else{
+			ccss.gqmc="";
+			ccss.gkjyr="";
+			ccss.rj="";
+			ccss.cg="";
+			ccss.gs="";
+			ccss.wxygs="";
+			ccss.zyhz="";
+			ccss.aqfzrlxdh="";
+			ccss.gkjyxkzh="";
+			ccss.zyfzbh="";
+		}
+		this.map.infoWindow.show(currFea.geometry.center); 
+	}
+	else if("yjwz_jyr"==event.token.message["operation"]){
+		var yjwz:ArrayCollection=event.result as ArrayCollection;
+		yjwzWin.list =yjwz;
+		PopUpManager.addPopUp(yjwzWin,FlexGlobals.topLevelApplication as DisplayObject,false);
+		PopUpManager.centerPopUp(yjwzWin);
+		this.map.infoWindow.show(currFea.geometry.center); 
+	}
+	else if("yjwz_dw"==event.token.message["operation"]){
+		var yjwz:ArrayCollection=event.result as ArrayCollection;
+		var name:String="";
+		var xh:Number=0;
+		var tjList:ArrayCollection=new ArrayCollection;
+		for each(var o:Object in yjwz){
+			o["WZFL"]=rm.getString("select",o["WZFL"]);
+			if(name!=o["WZFL"]){
+				var obj:Object=new Object;
+				obj["WZFL"]=o["WZFL"];
+				obj["index"]=yjwz.getItemIndex(o);
+				tjList.addItemAt(obj,0);
+				name=o["WZFL"];
+				xh=0;
+			}
+			o["WZFL"]=++xh;
+		}
+		for each(var o:Object in tjList){
+			yjwz.addItemAt(o,o.index);
+		}
+		yjwzGrid.list=yjwz;
+		if(yjwz.length>0)
+		{
+			yjwzGrid.mc=yjwz.getItemAt(0)["MC"];
+		}
+		this.map.infoWindow.show(currFea.geometry.center); 
+	}	// 应急网络
+	else if("yjwl"==event.token.message["operation"]){
+		qy=event.result;
+		if(null != qy){
+			yjwl.yjwlName=qy["NAME"];
+			yjwl.szd=rm.getString("select",qy["SZDMC"]);
+			yjwl.gq=qy["GQMC"];
+			yjwl.address=qy["ADDRESS"];
+			yjwl.tel=qy["TEL"];
+			yjwl.remark=qy["REMARK"];
+		}else{
+			yjwl.yjwlName="";
+			yjwl.szd="";
+			yjwl.gq="";
+			yjwl.address="";
+			yjwl.tel="";
+			yjwl.remark="";
+		}
+		this.map.infoWindow.show(currFea.geometry.center); 
+	}
+	else if("searchCg"==event.token.message["operation"]){
+		var list:ArrayCollection=event.result as ArrayCollection;
+		cg.list = list;
+		this.map.infoWindow.show(currFea.geometry.center); 
+	}
+	else if("searchBw"==event.token.message["operation"]){
+		qy=event.result;
+		if(null != qy){
+			bw.bwmc=qy["BWMC"];
+			bw.jyrmc=qy["GKJYR"];
+			bw.records=qy["RECORDS"];
+			bw.szdmc = qy["SZDMC"];
+			bw.gqmc = qy["GQMC"];
+			bw.bwcd = qy["BWCD"];
+			bw.sjkpnl = qy["SJKPNL"];
+			bw.nhwtgml = qy["NHWTGML"];
+			bw.qysjsh = qy["QYSJSH"];
+			bw.fwlxmc = qy["FWLXMC"];
+			this.map.infoWindow.show(currFea.geometry.center); 
+		}else{
+			bw.bwmc="";
+			bw.jyrmc="";
+			bw.records=new ArrayCollection;
+			bw.szdmc = "";
+			bw.gqmc = "";
+			bw.bwcd = "";
+			bw.sjkpnl = "";
+			bw.nhwtgml = "";
+			bw.qysjsh = "";
+			bw.fwlxmc = "";
+			this.map.infoWindow.hide();
+		}
+	}
+}
+

+ 200 - 0
gkaq/gis-flex/trunk/src/com/main/show.as

@@ -0,0 +1,200 @@
+import com.common.ConfigUtil;
+import com.common.ConstUtil;
+import com.server.QueryAction;
+import com.supermap.web.actions.MapAction;
+import com.supermap.web.core.Feature;
+import com.supermap.web.core.geometry.GeoLine;
+import com.supermap.web.core.geometry.GeoPoint;
+import com.supermap.web.core.geometry.GeoRegion;
+import com.supermap.web.core.styles.PictureMarkerStyle;
+import com.supermap.web.mapping.ElementsLayer;
+import com.supermap.web.mapping.FeaturesLayer;
+import com.supermap.web.mapping.GraphicsLayer;
+import com.utils.CommonUtility;
+import com.view.VideoTitleWindow;
+
+import flash.events.Event;
+import flash.events.MouseEvent;
+
+import mx.controls.Alert;
+import mx.controls.Tree;
+
+
+private var featureStyle:Object;
+
+private function checkBox_click(event:Event):void
+{
+	if(!featureStyle)
+		featureStyle = new Object();
+	var state:String = Tree(event.currentTarget).selectedItem.@STATE;
+	var layerId:String =  Tree(event.currentTarget).selectedItem.@CDID;
+	if(layerId=="ALL")
+	{
+		checkAllLayer(state);
+		return;
+	}
+	currSelectedLayerId = layerId;
+	featureStyle[currSelectedLayerId] = Tree(event.currentTarget).selectedItem.@CDTB;
+	if(state == "1")
+	{
+		var query:QueryAction = new QueryAction();
+		query.queryLayer(currSelectedLayerId,QueryLayerEvent.QUERY_SUCCESS,"");
+	}
+	else
+	{
+		map.infoWindow.closeButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
+		if(this.fLayer.features.length > 0)
+		{
+			var name:String;
+			for(var i:int = this.fLayer.features.length - 1; i > -1; i-- in this.fLayer.features)
+			{
+				name = this.fLayer.features[i].name;
+				if(name.indexOf(currSelectedLayerId) == 0)
+					this.fLayer.removeFeature(this.fLayer.features[i]);
+			}
+		}
+	}
+}
+/**
+ * 图层权限按钮处理
+ */
+private function checkAllLayer(state:String):void
+{
+	if(state == "1")
+	{
+		// 遍历所有菜单配置
+		var list:XMLList = menuXML.children();
+		for each( var xmlChildren:XML in list)  
+		{
+			if(xmlChildren.@CDID=="ALL")
+			{
+				continue;
+			}
+			xmlChildren.@STATE="1";
+			var query:QueryAction = new QueryAction();
+			query.queryLayer(xmlChildren.@CDID,QueryLayerEvent.QUERY_SUCCESS,"");
+		}
+	}
+	else
+	{
+		map.infoWindow.closeButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
+		if(this.fLayer.features.length > 0)
+		{
+			var name:String;
+			for(var i:int = this.fLayer.features.length - 1; i > -1; i-- in this.fLayer.features)
+			{
+			    this.fLayer.removeFeature(this.fLayer.features[i]);
+			}
+			clearAllCheckedMenu();
+		}
+		
+	}
+	return;
+}
+private function queryLayerSuccess(event:QueryLayerEvent):void
+{	
+	var obj:Object = event.data;
+	if(obj == null)
+	{
+		Alert.show("查询失败!","错误");
+		return;
+	}
+	var features:Array = obj.features;
+	var layerId:String = obj.layerId;
+	for each(var fea:Feature in features)
+	{
+		try
+		{
+			if(fea.geometry is GeoPoint)
+			{
+				var markerStyle:PictureMarkerStyle = new PictureMarkerStyle();
+				markerStyle.source = featureStyle[layerId].toString();
+				fea.style = markerStyle;
+			}
+			else if (fea.geometry is GeoLine)
+			{
+				fea.style = ConfigUtil.getPolylineStyle();
+			}
+			else if(fea.geometry is GeoRegion)
+			{
+				if(layerId == ConstUtil.L_ID_AQ_GQ)
+				{
+					fea.style = ConfigUtil.getPolygonStyle(0xffffff,0);
+				}else if(layerId == ConstUtil.L_ID_BW_AQ){
+					fea.style = ConfigUtil.getPolygonStyle(uint(0x009933),0.0,0x000000,1,0.0);
+				}else{
+					fea.style = ConfigUtil.getPolygonStyle();
+				}
+			}
+			fea.name = layerId;
+			fea.useHandCursor = true;
+			fea.mouseChildren = false;
+			fea.buttonMode = true;
+			fea.addEventListener(MouseEvent.CLICK,featureClick);
+			this.fLayer.addFeature(fea);
+		}
+		catch(err:Error)
+		{
+			
+		}
+	}
+}
+
+private function featureClick(event:MouseEvent):void
+{
+	var fea:Feature = event.currentTarget as Feature;
+	if(fea.name == ConstUtil.L_ID_SP)
+	{
+		var video:VideoTitleWindow = new VideoTitleWindow();
+		CommonUtility.showTitleWindow(video,false);
+		video.play(fea.attributes.WJLJ);
+		return;
+	}
+	map.infoWindow.label = ConfigUtil.getMapLayerLabel(fea.name);
+	map.infoWindow.setStyle("backgroundColor",0xFF1A96C8);
+	map.infoWindow.infoWindowLabel.setStyle('color', 0xffffff);
+	map.infoWindow.infoWindowLabel.setStyle('fontFamily', "华文新魏");
+	map.infoWindow.infoWindowLabel.setStyle('fontSize', "16");
+	this.showInfoGrid(fea);
+//	map.infoWindow.content = this.getInfoWinGrid(fea.attributes.ID,fea.name,fea.attributes);
+//	map.infoWindow.label = ConfigUtil.getMapLayerLabel(fea.name);
+//	map.infoWindow.setStyle("backgroundColor",0xFF1A96C8);
+//	map.infoWindow.infoWindowLabel.setStyle('color', 0xffffff);
+//	map.infoWindow.infoWindowLabel.setStyle('fontFamily', "华文新魏");
+//	map.infoWindow.infoWindowLabel.setStyle('fontSize', "16");
+//	map.infoWindow.show(fea.geometry.center); 
+}
+
+private function queryLayerFault(event:QueryLayerEvent):void
+{
+	//Alert.show("查询失败!","错误");
+}
+/**
+ * clear FeatureLayer GraphicsLayer ElementLayer
+ * */
+public function clearAllTempLayer():void
+{
+	var mapAction:MapAction = this.map.action;
+	map.action = null;
+	map.action = mapAction;
+	map.infoWindow.closeButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
+//	detailCt.show=false;
+	for each(var obj:Object in this.map.layers)
+	{
+		if(obj is GraphicsLayer)
+			(obj as GraphicsLayer).graphics.clear();
+		else if(obj is FeaturesLayer)
+			(obj as FeaturesLayer).clear();
+		else if(obj is ElementsLayer)
+			(obj as ElementsLayer).clear();
+	}
+	clearAllCheckedMenu();
+}
+public function clearAllCheckedMenu():void
+{
+	var list:XMLList = menuXML.children();
+	for each( var xmlChildren:XML in list)  
+	{
+		xmlChildren.@STATE = "0";
+	}
+}

+ 126 - 0
gkaq/gis-flex/trunk/src/com/server/QueryAction.as

@@ -0,0 +1,126 @@
+package com.server
+{
+	import com.common.ConfigUtil;
+	import com.supermap.framework.events.BaseEventDispatcher;
+	import com.supermap.web.actions.Pan;
+	import com.supermap.web.core.geometry.GeoRegion;
+	import com.supermap.web.core.geometry.Geometry;
+	import com.supermap.web.iServerJava6R.FilterParameter;
+	import com.supermap.web.iServerJava6R.Recordset;
+	import com.supermap.web.iServerJava6R.queryServices.QueryByGeometryParameters;
+	import com.supermap.web.iServerJava6R.queryServices.QueryByGeometryService;
+	import com.supermap.web.iServerJava6R.queryServices.QueryBySQLParameters;
+	import com.supermap.web.iServerJava6R.queryServices.QueryBySQLService;
+	import com.supermap.web.iServerJava6R.queryServices.QueryResult;
+	import com.supermap.web.iServerJava6R.queryServices.SpatialQueryMode;
+	//import com.supermap.web.iServerJava6R.serverTypes.ServerGeometryType;
+	import com.supermap.web.utils.serverTypes.ServerGeometryType;
+	import com.supermap.web.mapping.Map;
+	
+	import flash.events.Event;
+	
+	import mx.controls.Alert;
+	import mx.rpc.AsyncResponder;
+	
+	public class QueryAction
+	{
+		public function QueryAction()
+		{
+		}
+		
+		private var layerid:String = null;
+		
+		private var eventType:String;
+		
+		private var RETURN_DATA_NUMBER:int = 500;
+		
+		public function queryLayer(layerId:String,eventFlag:String,where:String = null,isExpectCount:Boolean = false):void
+		{
+			var layerName:String = ConfigUtil.getMapLayerNameAndOwner(layerId);
+			var url:String = ConfigUtil.getMapUrl(layerId);
+			if(!layerName || !url)
+			{
+				Alert.show("当前图层不存在!","异常");
+				return;
+			}
+			eventType = eventFlag;
+			layerid = layerId;
+			if(layerName.indexOf(",") > 0)
+				layerName = layerName.split(",")[0];
+			
+			var queryBySQLParam:QueryBySQLParameters = new QueryBySQLParameters();
+			var filter:FilterParameter = new FilterParameter();
+			filter.name = layerName;
+			if(where)
+				filter.attributeFilter = where;
+			queryBySQLParam.filterParameters = [filter];
+			queryBySQLParam.returnContent = true;
+			if(isExpectCount)
+				queryBySQLParam.expectCount = RETURN_DATA_NUMBER;
+			var queryByDistanceService:QueryBySQLService = new QueryBySQLService(url);
+			queryByDistanceService.processAsync(queryBySQLParam, new AsyncResponder(this.handlerResult, 
+				function (object:Object, mark:Object = null):void
+				{
+					Alert.show("与服务端交互失败", "抱歉");
+				}, null));
+		}
+		
+		public function spatialQueryLayer(layerId:String,eventFlag:String,geometry:Geometry,where:String = null,isExpectCount:Boolean = false):void
+		{
+			var layerName:String = ConfigUtil.getMapLayerNameAndOwner(layerId);
+			var url:String = ConfigUtil.getMapUrl(layerId);
+			if(!layerName || !url)
+			{
+				Alert.show("当前图层不存在!","异常");
+				return;
+			}
+			eventType = eventFlag;
+			layerid = layerId;
+			if(layerName.indexOf(",") > 0)
+				layerName = layerName.split(",")[0];
+			
+			var sqlParam:FilterParameter = new FilterParameter();
+			sqlParam.name = layerName;
+			if(where)
+				sqlParam.attributeFilter = where;
+			
+			//定义几何查询参数
+			//定义过滤条件
+			var queryParam:QueryByGeometryParameters = new QueryByGeometryParameters();
+			queryParam.networkType = ServerGeometryType.LINE;
+			queryParam.returnContent = true;
+			queryParam.filterParameters = [sqlParam];	
+			if(isExpectCount)
+				queryParam.expectCount = RETURN_DATA_NUMBER;
+			queryParam.spatialQueryMode = SpatialQueryMode.INTERSECT;
+			queryParam.geometry = geometry;
+			
+			
+			//执行几何查询
+			var geometryQuery:QueryByGeometryService = new QueryByGeometryService(url);
+			geometryQuery.processAsync(queryParam,new AsyncResponder(this.handlerResult,
+				function (object:Object, mark:Object = null):void
+				{
+					Alert.show("与服务端交互失败", "抱歉");
+				}, null));
+		}
+		
+		private function handlerResult(queryResult:QueryResult, mark:Object = null):void
+		{
+			var recordSets:Array = queryResult.recordsets;
+
+			if(recordSets && recordSets.length != 0)
+			{
+				for each(var recordSet:Recordset in recordSets)
+				{
+					if(!recordSet.features || recordSet.features.length == 0)
+						BaseEventDispatcher.getInstance().dispatchEvent(new QueryLayerEvent(QueryLayerEvent.QUERY_FAULT,{features:new Array(),layerId:layerid}));
+					else 
+						BaseEventDispatcher.getInstance().dispatchEvent(new QueryLayerEvent(eventType,{features:recordSet.features,layerId:layerid}));
+				}
+			}
+			else
+				BaseEventDispatcher.getInstance().dispatchEvent(new QueryLayerEvent(QueryLayerEvent.QUERY_FAULT,{features:new Array(),layerId:layerid}));
+		}
+	}
+}

+ 9 - 0
gkaq/gis-flex/trunk/src/com/server/Service.mxml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<cairngorm:ServiceLocator xmlns:fx="http://ns.adobe.com/mxml/2009"  
+						  xmlns:s="library://ns.adobe.com/flex/spark"  
+						  xmlns:mx="library://ns.adobe.com/flex/mx" 
+						  xmlns:cairngorm="com.adobe.cairngorm.business.*">  
+	<fx:Declarations>
+		<s:RemoteObject id="gisController" destination="gisController" showBusyCursor="true" />
+	</fx:Declarations>
+</cairngorm:ServiceLocator>

+ 74 - 0
gkaq/gis-flex/trunk/src/com/server/XMLDecoder.as

@@ -0,0 +1,74 @@
+package com.server
+{
+	import com.events.DataConfigEvent;
+	
+	import flash.events.EventDispatcher;
+	import flash.events.IEventDispatcher;
+	
+	import mx.controls.Alert;
+	import mx.rpc.events.FaultEvent;
+	import mx.rpc.events.ResultEvent;
+	import mx.rpc.http.HTTPService;
+	
+	[Event(name="mapConfigLoad", type="com.events.DataConfigEvent")]
+	[Event(name="menuConfigLoad", type="com.events.DataConfigEvent")]
+	public class XMLDecoder extends EventDispatcher
+	{
+		public function XMLDecoder()
+		{			
+			mapConfigLoad(); 
+			menuConfigLoad();
+		}
+		
+		private var mapConfig:String = "com/config/MapConfig.xml";
+		private var menuConfig:String = "com/config/MenuConfig.xml";
+		
+		private function mapConfigLoad():void
+		{
+			var configService:HTTPService = new HTTPService();			
+			configService.url = mapConfig;
+			configService.resultFormat = "e4x";
+			configService.addEventListener(ResultEvent.RESULT, configResult);
+			configService.addEventListener(FaultEvent.FAULT, configFault);	
+			configService.send();
+		}
+		
+		private function configResult(event:ResultEvent):void
+		{						
+			var config:XML = event.result as XML;
+			dispatchEvent(new DataConfigEvent(DataConfigEvent.MAPCONFIG_LOAD, config));
+		}
+		
+		/**
+		 *  当主配置文件解析失败时 派发CONFIG_LOAD_ERROR事件
+		 */
+		private function configFault(event:FaultEvent):void
+		{			
+			this.dispatchEvent(new DataConfigEvent(DataConfigEvent.CONFIG_LOAD_ERROR, event.fault));
+		}
+		
+		private function menuConfigLoad():void
+		{
+			var configService:HTTPService = new HTTPService();			
+			configService.url = menuConfig;
+			configService.resultFormat = "e4x";
+			configService.addEventListener(ResultEvent.RESULT, menuConfigResult);
+			configService.addEventListener(FaultEvent.FAULT, menuConfigFault);	
+			configService.send();
+		}
+		
+		private function menuConfigResult(event:ResultEvent):void
+		{						
+			var config:XML = event.result as XML;
+			dispatchEvent(new DataConfigEvent(DataConfigEvent.MENUCONFIG_LOAD, config));
+		}
+		
+		/**
+		 *  当主配置文件解析失败时 派发CONFIG_LOAD_ERROR事件
+		 */
+		private function menuConfigFault(event:FaultEvent):void
+		{			
+			this.dispatchEvent(new DataConfigEvent(DataConfigEvent.CONFIG_LOAD_ERROR, event.fault));
+		}
+	}
+}

+ 238 - 0
gkaq/gis-flex/trunk/src/com/skins/ButtonRectImgSkin.mxml

@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+ADOBE SYSTEMS INCORPORATED
+Copyright 2008 Adobe Systems Incorporated
+All Rights Reserved.
+
+NOTICE: Adobe permits you to use, modify, and distribute this file
+in accordance with the terms of the license agreement accompanying it.
+
+-->
+
+<!--- The default skin class for the Spark Button component.  
+
+@see spark.components.Button
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" 
+			 xmlns:s="library://ns.adobe.com/flex/spark" 
+			 xmlns:fb="http://ns.adobe.com/flashbuilder/2009" 
+			 minWidth="21" minHeight="21" alpha.disabled="0.5" 
+			 xmlns:mx="library://ns.adobe.com/flex/mx" 
+			 creationComplete="init();"
+			 height="40" width="40">
+	
+	<!-- host component -->
+	<fx:Metadata>
+		<![CDATA[ 
+		/** 
+		* @copy spark.skins.spark.GroupSkin#hostComponent
+		*/
+		[HostComponent("spark.components.Button")]
+		]]>
+	</fx:Metadata>
+	
+	<fx:Script fb:purpose="styling">
+		<![CDATA[
+			/* Define the skin elements that should not be colorized. 
+			For button, the graphics are colorized but the label is not. */
+			static private const exclusions:Array = ["labelDisplay"];
+			
+			private function init():void
+			{
+				try
+				{
+					currImg.source = hostComponent.accessibilityDescription;
+				}
+				catch(e:Error)
+				{
+					
+				}
+			}
+			
+			/** 
+			 * @private
+			 */     
+			override public function get colorizeExclusions():Array {return exclusions;}
+			
+			/**
+			 * @private
+			 */
+			override protected function initializationComplete():void
+			{
+				useChromeColor = true;
+				super.initializationComplete(); 
+			}  
+			
+			/**
+			 *  @private
+			 */
+			override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+			{
+				var cr:Number = getStyle("cornerRadius");
+				
+				if (cornerRadius != cr)
+				{
+					cornerRadius = cr;
+					shadow.radiusX = cornerRadius;
+					fill.radiusX = cornerRadius;
+					lowlight.radiusX = cornerRadius;
+					highlight.radiusX = cornerRadius;
+					border.radiusX = cornerRadius;
+				}
+				
+				if (highlightStroke) highlightStroke.radiusX = cornerRadius;
+				if (hldownstroke1) hldownstroke1.radiusX = cornerRadius;
+				if (hldownstroke2) hldownstroke2.radiusX = cornerRadius; 
+				
+				super.updateDisplayList(unscaledWidth, unscaledHeight);
+			}
+			
+			private var cornerRadius:Number = 2;
+		]]>        
+	</fx:Script>
+	
+	<!-- states -->
+	<s:states>
+		<s:State name="up" />
+		<s:State name="over" />
+		<s:State name="down" />
+		<s:State name="disabled" />
+	</s:states>
+	
+	<!-- layer 1: shadow -->
+	<!--- @private -->
+	<s:Rect id="shadow" left="-1" right="-1" top="-1" bottom="-1" radiusX="2">
+		<s:fill>
+			<s:LinearGradient rotation="90">
+				<s:GradientEntry color="0x000000" 
+								 color.down="0xFFFFFF"
+								 alpha="0.01"
+								 alpha.down="0" />
+				<s:GradientEntry color="0x000000" 
+								 color.down="0xFFFFFF" 
+								 alpha="0.07"
+								 alpha.down="0.5" />
+			</s:LinearGradient>
+		</s:fill>
+	</s:Rect>
+	
+	<!-- layer 2: fill -->
+	<!--- @private -->
+	<s:Rect id="fill" left="1" right="1" top="1" bottom="1" radiusX="2">
+		<s:fill>
+			<s:LinearGradient rotation="90">
+				<s:GradientEntry color="0xFFFFFF" 
+								 color.over="0xBBBDBD" 
+								 color.down="0xAAAAAA" 
+								 alpha="0.85" />
+				<s:GradientEntry color="0xD8D8D8" 
+								 color.over="0x9FA0A1" 
+								 color.down="0x929496" 
+								 alpha="0.85" />
+			</s:LinearGradient>
+		</s:fill>
+	</s:Rect>
+	
+	<!-- layer 3: fill lowlight -->
+	<!--- @private -->
+	<s:Rect id="lowlight" left="1" right="1" top="1" bottom="1" radiusX="2">
+		<s:fill>
+			<s:LinearGradient rotation="270">
+				<s:GradientEntry color="0x000000" ratio="0.0" alpha="0.0627" />
+				<s:GradientEntry color="0x000000" ratio="0.48" alpha="0.0099" />
+				<s:GradientEntry color="0x000000" ratio="0.48001" alpha="0" />
+			</s:LinearGradient>
+		</s:fill>
+	</s:Rect>
+	
+	<!-- layer 4: fill highlight -->
+	<!--- @private -->
+	<s:Rect id="highlight" left="1" right="1" top="1" bottom="1" radiusX="2">
+		<s:fill>
+			<s:LinearGradient rotation="90">
+				<s:GradientEntry color="0xFFFFFF"
+								 ratio="0.0"
+								 alpha="0.33" 
+								 alpha.over="0.22" 
+								 alpha.down="0.12"/>
+				<s:GradientEntry color="0xFFFFFF"
+								 ratio="0.48"
+								 alpha="0.33"
+								 alpha.over="0.22"
+								 alpha.down="0.12" />
+				<s:GradientEntry color="0xFFFFFF"
+								 ratio="0.48001"
+								 alpha="0" />
+			</s:LinearGradient>
+		</s:fill>
+	</s:Rect>
+	
+	<!-- layer 5: highlight stroke (all states except down) -->
+	<!--- @private -->
+	<s:Rect id="highlightStroke" left="1" right="1" top="1" bottom="1" radiusX="2" excludeFrom="down">
+		<s:stroke>
+			<s:LinearGradientStroke rotation="90" weight="1">
+				<s:GradientEntry color="0xFFFFFF" alpha.over="0.22" />
+				<s:GradientEntry color="0xD8D8D8" alpha.over="0.22" />
+			</s:LinearGradientStroke>
+		</s:stroke>
+	</s:Rect>
+	
+	<!-- layer 6: highlight stroke (down state only) -->
+	<!--- @private -->
+	<s:Rect id="hldownstroke1" left="1" right="1" top="1" bottom="1" radiusX="2" includeIn="down">
+		<s:stroke>
+			<s:LinearGradientStroke rotation="90" weight="1">
+				<s:GradientEntry color="0x000000" alpha="0.25" ratio="0.0" />
+				<s:GradientEntry color="0x000000" alpha="0.25" ratio="0.001" />
+				<s:GradientEntry color="0x000000" alpha="0.07" ratio="0.0011" />
+				<s:GradientEntry color="0x000000" alpha="0.07" ratio="0.965" />
+				<s:GradientEntry color="0x000000" alpha="0.00" ratio="0.9651" />
+			</s:LinearGradientStroke>
+		</s:stroke>
+	</s:Rect>
+	<!--- @private -->
+	<s:Rect id="hldownstroke2" left="2" right="2" top="2" bottom="2" radiusX="2" includeIn="down">
+		<s:stroke>
+			<s:LinearGradientStroke rotation="90" weight="1">
+				<s:GradientEntry color="0x000000" alpha="0.09" ratio="0.0" />
+				<s:GradientEntry color="0x000000" alpha="0.00" ratio="0.0001" />
+			</s:LinearGradientStroke>
+		</s:stroke>
+	</s:Rect>
+	
+	<!-- layer 7: border - put on top of the fill so it doesn't disappear when scale is less than 1 -->
+	<!--- @private -->
+	<s:Rect id="border" left="0" right="0" top="0" bottom="0" width="69" height="20" radiusX="2">
+		<s:stroke>
+			<s:LinearGradientStroke rotation="90" weight="1">
+				<s:GradientEntry color="0x000000" 
+								 alpha="0.5625"
+								 alpha.down="0.6375" />
+				<s:GradientEntry color="0x000000" 
+								 alpha="0.75" 
+								 alpha.down="0.85" />
+			</s:LinearGradientStroke>
+		</s:stroke>
+	</s:Rect>
+	
+	<!-- layer 8: text -->
+	<!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay -->
+	<s:Label id="labelDisplay"
+			 textAlign="center"
+			 verticalAlign="middle"
+			 maxDisplayedLines="1"
+			 horizontalCenter="0" verticalCenter="1"
+			 left="10" right="10" top="2" bottom="2" text="">
+	</s:Label>
+	
+	<mx:Image id="currImg" source="@Embed('images/map/pan.png')" width="28" height="28" horizontalCenter="0" verticalCenter="0"/>
+	
+</s:SparkSkin>

+ 113 - 0
gkaq/gis-flex/trunk/src/com/skins/ButtonSkin.mxml

@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+    ADOBE SYSTEMS INCORPORATED
+    Copyright 2008 Adobe Systems Incorporated
+    All Rights Reserved.
+
+    NOTICE: Adobe permits you to use, modify, and distribute this file
+    in accordance with the terms of the license agreement accompanying it.
+
+-->
+
+<!--- The default skin class for the Spark Button component.  
+
+       @see spark.components.Button
+        
+      @langversion 3.0
+      @playerversion Flash 10
+      @playerversion AIR 1.5
+      @productversion Flex 4
+-->
+<s:SparkButtonSkin xmlns:fx="http://ns.adobe.com/mxml/2009" 
+             xmlns:s="library://ns.adobe.com/flex/spark" 
+             xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
+             width="58" height="26"  minHeight="28"
+             alpha.disabled="0.5">
+     
+    <fx:Metadata>
+        <![CDATA[ 
+        /** 
+         * @copy spark.skins.spark.ApplicationSkin#hostComponent
+         */
+        [HostComponent("spark.components.Button")]
+        ]]>
+    </fx:Metadata>
+    
+    <fx:Script fb:purpose="styling">
+        <![CDATA[         
+            import spark.components.Group;
+            /* Define the skin elements that should not be colorized. 
+            For button, the graphics are colorized but the label is not. */
+            static private const exclusions:Array = ["labelDisplay"];
+            
+            /** 
+             * @private
+             */     
+            override public function get colorizeExclusions():Array {return exclusions;}
+            
+            /**
+             * @private
+             */
+            override protected function initializationComplete():void
+            {
+                useChromeColor = true;
+                super.initializationComplete();
+            }  
+            
+            /**
+             *  @private
+             */
+            override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+            {
+                var cr:Number = getStyle("cornerRadius");
+                
+//                if (cornerRadius != cr)
+//                {
+//                    cornerRadius = cr;
+//                    shadow.radiusX = cornerRadius;
+//                    fill.radiusX = cornerRadius;
+//                    lowlight.radiusX = cornerRadius;
+//                }
+                
+//                if (highlightStroke) highlightStroke.radiusX = cornerRadius;
+//                if (hldownstroke1) hldownstroke1.radiusX = cornerRadius;
+//                if (hldownstroke2) hldownstroke2.radiusX = cornerRadius;
+                
+                super.updateDisplayList(unscaledWidth, unscaledHeight);
+            }
+            
+                                 
+        ]]>        
+    </fx:Script>
+        
+    <!-- states -->
+    <s:states>
+        <s:State name="up" />
+        <s:State name="over" />
+        <s:State name="down" />
+        <s:State name="disabled" />
+    </s:states>
+    
+    <!-- layer 2: fill -->
+    <!--- @private -->
+    <s:Rect id="fill" left="0" right="0" top="0" bottom="0">
+        <s:fill>
+			<s:BitmapFill  
+				source.up="@Embed('/images/yjpt/list/btn.png')" 
+				source.down="@Embed('/images/yjpt/list/btn_hover.png')" 
+				source.disabled="@Embed('/images/yjpt/list/btn.png')"
+				source.over="@Embed('/images/yjpt/list/btn_hover.png')"/>
+		</s:fill>
+    </s:Rect>
+    <!-- layer 8: text -->
+    <!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay  -->
+    <s:Label id="labelDisplay"
+             textAlign="center"
+             maxDisplayedLines="1" fontSize="12"
+             horizontalCenter="0" verticalCenter="1" verticalAlign="middle"
+             left="10" right="10" top="2" bottom="2">
+    </s:Label>
+    
+</s:SparkButtonSkin>

+ 223 - 0
gkaq/gis-flex/trunk/src/com/skins/ComboBoxButtonSkin.mxml

@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+ADOBE SYSTEMS INCORPORATED
+Copyright 2010 Adobe Systems Incorporated
+All Rights Reserved.
+
+NOTICE: Adobe permits you to use, modify, and distribute this file
+in accordance with the terms of the license agreement accompanying it.
+
+-->
+
+<!--- The default skin class for the anchor button on a Spark ComboBox component.  
+
+@see spark.components.ComboBox        
+@see spark.skins.spark.ComboBoxSkin
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
+			 xmlns:fb="http://ns.adobe.com/flashbuilder/2009" minWidth="19" minHeight="23">
+	
+	<fx:Metadata>
+		<![CDATA[ 
+		/** 
+		* @copy spark.skins.spark.ApplicationSkin#hostComponent
+		*/
+		[HostComponent("spark.components.Button")]
+		]]>
+	</fx:Metadata> 
+	
+	<fx:Script fb:purpose="styling">
+		/* Define the skin elements that should not be colorized. 
+		For dropDownList buttons, the graphics are colorized but the arrow is not. */
+		static private const exclusions:Array = ["arrow"];
+		
+		private var cornerRadius:Number = 0;
+		
+		/** 
+		 * @private
+		 */     
+		override public function get colorizeExclusions():Array {return exclusions;}
+		
+		/* Define the symbol fill items that should be colored by the "symbolColor" style. */
+		static private const symbols:Array = ["arrowFill1", "arrowFill2"];
+		
+		/**
+		 * @private 
+		 */
+		override public function get symbolItems():Array {return symbols};
+		
+		/**
+		 * @private
+		 */
+		override protected function initializationComplete():void
+		{
+			useChromeColor = true;
+			super.initializationComplete();
+		}
+		
+		/**
+		 *  @private
+		 */
+		override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+		{
+			var cr:Number = getStyle("cornerRadius");
+			
+			if (cornerRadius != cr)
+			{
+				cornerRadius = cr;
+				fill.bottomRightRadiusX = fill.topRightRadiusX = cornerRadius;
+				lowlight.bottomRightRadiusX = lowlight.topRightRadiusX = cornerRadius;
+				highlight.bottomRightRadiusX = highlight.topRightRadiusX = cornerRadius;
+				border.bottomRightRadiusX = border.topRightRadiusX = cornerRadius;
+			}
+			
+			if (highlightStroke) 
+				highlightStroke.bottomRightRadiusX = highlightStroke.topRightRadiusX = cornerRadius;
+			if (hldownstroke1)
+				hldownstroke1.bottomRightRadiusX = hldownstroke1.topRightRadiusX = cornerRadius;
+			if (hldownstroke2)
+				hldownstroke2.bottomRightRadiusX = hldownstroke2.topRightRadiusX = cornerRadius;
+			
+			super.updateDisplayList(unscaledWidth, unscaledHeight);
+		}
+	</fx:Script>
+	
+	<!-- states -->
+	<s:states>
+		<s:State name="up" />
+		<s:State name="over" />
+		<s:State name="down" />
+		<s:State name="disabled" />
+	</s:states>
+	
+	<!-- layer 1: fill -->
+	<!--- @private -->
+	<s:Rect id="fill" left="1" right="1" top="1" bottom="1">
+		<s:fill>
+			<s:LinearGradient rotation="90">
+				<s:GradientEntry color="0xFFFFFF" 
+								 color.over="0xBBBDBD" 
+								 color.down="0xAAAAAA" 
+								 alpha="0.85" />
+				<s:GradientEntry color="0xD8D8D8" 
+								 color.over="0x9FA0A1" 
+								 color.down="0x929496" 
+								 alpha="0.85" />
+			</s:LinearGradient>
+		</s:fill>
+	</s:Rect>
+	
+	<!-- layer 2: fill lowlight -->
+	<!--- @private -->
+	<s:Rect id="lowlight" left="1" right="1" top="1" bottom="1">
+		<s:fill>
+			<s:LinearGradient rotation="270">
+				<s:GradientEntry color="0x000000" ratio="0.0" alpha="0.0627" />
+				<s:GradientEntry color="0x000000" ratio="0.48" alpha="0.0099" />
+				<s:GradientEntry color="0x000000" ratio="0.48001" alpha="0" />
+			</s:LinearGradient>
+		</s:fill>
+	</s:Rect>
+	
+	<!-- layer 3: fill highlight -->
+	<!--- @private -->
+	<s:Rect id="highlight" left="1" right="1" top="1" bottom="1">
+		<s:fill>
+			<s:LinearGradient rotation="90">
+				<s:GradientEntry color="0xFFFFFF"
+								 ratio="0.0"
+								 alpha="0.33" 
+								 alpha.over="0.22" 
+								 alpha.down="0.12"/>
+				<s:GradientEntry color="0xFFFFFF"
+								 ratio="0.48"
+								 alpha="0.33"
+								 alpha.over="0.22"
+								 alpha.down="0.12" />
+				<s:GradientEntry color="0xFFFFFF"
+								 ratio="0.48001"
+								 alpha="0" />
+			</s:LinearGradient>
+		</s:fill>
+	</s:Rect>
+	
+	<!-- layer 4: highlight stroke (all states except down) -->
+	<!--- @private -->
+	<s:Rect id="highlightStroke" left="1" right="1" top="1" bottom="1" radiusX="0" radiusY="0" excludeFrom="down">
+		<s:stroke>
+			<s:LinearGradientStroke rotation="90" weight="1">
+				<s:GradientEntry color="0xFFFFFF" alpha.over="0.22" />
+				<s:GradientEntry color="0xD8D8D8" alpha.over="0.22" />
+			</s:LinearGradientStroke>
+		</s:stroke>
+	</s:Rect>
+	
+	<!-- layer 5: highlight stroke (down state only) -->
+	<!--- @private -->
+	<s:Rect id="hldownstroke1" left="1" right="1" top="1" bottom="1" radiusX="0" radiusY="0" includeIn="down">
+		<s:stroke>
+			<s:LinearGradientStroke rotation="90" weight="1">
+				<s:GradientEntry color="0x000000" alpha="0.25" ratio="0.0" />
+				<s:GradientEntry color="0x000000" alpha="0.25" ratio="0.001" />
+				<s:GradientEntry color="0x000000" alpha="0.07" ratio="0.0011" />
+				<s:GradientEntry color="0x000000" alpha="0.07" ratio="0.965" />
+				<s:GradientEntry color="0x000000" alpha="0.00" ratio="0.9651" />
+			</s:LinearGradientStroke>
+		</s:stroke>
+	</s:Rect>
+	<!--- @private -->
+	<s:Rect id="hldownstroke2" left="2" right="2" top="2" bottom="2" radiusX="0" radiusY="0" includeIn="down">
+		<s:stroke>
+			<s:LinearGradientStroke rotation="90" weight="1">
+				<s:GradientEntry color="0x000000" alpha="0.09" ratio="0.0" />
+				<s:GradientEntry color="0x000000" alpha="0.00" ratio="0.0001" />
+			</s:LinearGradientStroke>
+		</s:stroke>
+	</s:Rect>
+	
+	<!-- layer 6: border - put on top of the fill so it doesn't disappear when scale is less than 1 -->
+	<!--- @private -->
+	<s:Rect id="border" left="0" right="0" top="0" bottom="0" width="18" height="21">
+		<s:stroke>
+			<s:LinearGradientStroke rotation="90" weight="1">
+				
+				<!-- 000000 -->
+				<s:GradientEntry color="0xd2d2d2" 
+								 alpha="0.5625"
+								 alpha.down="0.6375" />
+				<s:GradientEntry color="0xd2d2d2" 
+								 alpha="0.75" 
+								 alpha.down="0.85" />
+			</s:LinearGradientStroke>
+		</s:stroke>
+	</s:Rect>
+	
+	<!-- layer 7: arrow -->
+	<!--- The arrow graphic displayed in the anchor button. -->
+	<s:Path right="6" verticalCenter="0" id="arrow"
+			data="M 4.0 4.0 L 4.0 3.0 L 5.0 3.0 L 5.0 2.0 L 6.0 2.0 L 6.0 1.0 L 7.0 1.0 L 7.0 0.0 L 0.0 0.0 L 0.0 1.0 L 1.0 1.0 L 1.0 2.0 L 2.0 2.0 L 2.0 3.0 L 3.0 3.0 L 3.0 4.0 L 4.0 4.0">
+		<s:fill>
+			<s:RadialGradient rotation="90" focalPointRatio="1">   
+				<!--- 
+				@private
+				The first part of the arrow's gradient fill. 
+				The default alpha is .6. The default color if 0x000000.
+				-->
+				<s:GradientEntry id="arrowFill1" color="0" alpha="0.6" />
+				<!--- 
+				@private 
+				The second part of the arrow's gradient fill. 
+				The default alpha is .6. The default color if 0x000000.
+				-->
+				<s:GradientEntry id="arrowFill2" color="0" alpha="0.8" />
+			</s:RadialGradient>
+		</s:fill>
+	</s:Path>
+</s:SparkSkin>

+ 247 - 0
gkaq/gis-flex/trunk/src/com/skins/DateTimeInputSkin.mxml

@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+    ADOBE SYSTEMS INCORPORATED
+    Copyright 2008 Adobe Systems Incorporated
+    All Rights Reserved.
+
+    NOTICE: Adobe permits you to use, modify, and distribute this file
+    in accordance with the terms of the license agreement accompanying it.
+
+-->
+<!--- The default skin class for Spark TextInput component.  
+
+     @see spark.components.TextInput
+        
+      @langversion 3.0
+      @playerversion Flash 10
+      @playerversion AIR 1.5
+      @productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+    xmlns:fb="http://ns.adobe.com/flashbuilder/2009" 
+    alpha.disabledStates="0.5" blendMode="normal">
+	<fx:Metadata>[HostComponent("com.view.ui.QTextInput")]</fx:Metadata>
+
+    <fx:Script fb:purpose="styling">
+        <![CDATA[
+        import mx.core.FlexVersion;
+        
+        private var paddingChanged:Boolean;
+        
+        /* Define the skin elements that should not be colorized. */
+        static private const exclusions:Array = ["background", "textDisplay", "promptDisplay", "border"];
+        
+        /* exclusions before Flex 4.5 for backwards-compatibility purposes */
+        static private const exclusions_4_0:Array = ["background", "textDisplay", "promptDisplay"];
+        
+        /**
+         * @private
+         */
+        override public function get colorizeExclusions():Array 
+        {
+            // Since border is styleable via borderColor, no need to allow chromeColor to affect
+            // the border.  This is wrapped in a compatibility flag since this change was added  
+            // in Flex 4.5
+            if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_5)
+            {
+                return exclusions_4_0;
+            }
+            
+            return exclusions;
+        }
+        
+        /* Define the content fill items that should be colored by the "contentBackgroundColor" style. */
+        static private const contentFill:Array = ["bgFill"];
+
+        /**
+         *  @private
+         */
+        override public function get contentItems():Array {return contentFill};
+        
+        /**
+         *  @private
+         */
+        override protected function commitProperties():void
+        {
+            super.commitProperties();
+            
+            if (paddingChanged)
+            {
+                updatePadding();
+                paddingChanged = false;
+            }
+        }
+        
+        /**
+         * @private
+         */
+        override protected function initializationComplete():void
+        {
+            useChromeColor = true;
+            super.initializationComplete();
+        }
+        
+        /**
+         *  @private
+         */
+        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+        {
+            if (getStyle("borderVisible") == true)
+            {
+                border.visible = true;
+                shadow.visible = true;
+                background.left = background.top = background.right = background.bottom = 1;
+                textDisplay.left = textDisplay.top = textDisplay.right = textDisplay.bottom = 1;
+                if (promptDisplay)
+                {
+                    promptDisplay.setLayoutBoundsSize(unscaledWidth - 2, unscaledHeight - 2);
+                    promptDisplay.setLayoutBoundsPosition(1, 1);
+                }
+            }
+            else
+            {
+                border.visible = false;
+                shadow.visible = false;
+                background.left = background.top = background.right = background.bottom = 0;
+                textDisplay.left = textDisplay.top = textDisplay.right = textDisplay.bottom = 0;
+                if (promptDisplay)
+                {
+                    promptDisplay.setLayoutBoundsSize(unscaledWidth, unscaledHeight);
+                    promptDisplay.setLayoutBoundsPosition(0, 0);
+                }
+            }
+            
+            borderStroke.color = getStyle("borderColor");
+            borderStroke.alpha = getStyle("borderAlpha");
+            
+            super.updateDisplayList(unscaledWidth, unscaledHeight);
+        }
+
+        /**
+         *  @private
+         */
+        private function updatePadding():void
+        {
+            if (!textDisplay)
+                return;
+            
+            // Push padding styles into the textDisplay
+            var padding:Number;
+            
+            padding = getStyle("paddingLeft");
+            if (textDisplay.getStyle("paddingLeft") != padding)
+                textDisplay.setStyle("paddingLeft", padding);
+            
+            padding = getStyle("paddingTop");
+            if (textDisplay.getStyle("paddingTop") != padding)
+                textDisplay.setStyle("paddingTop", padding);
+            
+            padding = getStyle("paddingRight");
+            if (textDisplay.getStyle("paddingRight") != padding)
+                textDisplay.setStyle("paddingRight", padding);
+            
+            padding = getStyle("paddingBottom");
+            if (textDisplay.getStyle("paddingBottom") != padding)
+                textDisplay.setStyle("paddingBottom", padding);
+            
+            if (!promptDisplay)
+                return;
+            
+            padding = getStyle("paddingLeft");
+            if (promptDisplay.getStyle("paddingLeft") != padding)
+                promptDisplay.setStyle("paddingLeft", padding);
+            
+            padding = getStyle("paddingTop");
+            if (promptDisplay.getStyle("paddingTop") != padding)
+                promptDisplay.setStyle("paddingTop", padding);
+            
+            padding = getStyle("paddingRight");
+            if (promptDisplay.getStyle("paddingRight") != padding)
+                promptDisplay.setStyle("paddingRight", padding);
+            
+            padding = getStyle("paddingBottom");
+            if (promptDisplay.getStyle("paddingBottom") != padding)
+                promptDisplay.setStyle("paddingBottom", padding);
+        }
+        
+        /**
+         *  @private
+         */
+        override public function styleChanged(styleProp:String):void
+        {
+            var allStyles:Boolean = !styleProp || styleProp == "styleName";
+
+            super.styleChanged(styleProp);
+            
+            if (allStyles || styleProp.indexOf("padding") == 0)
+            {
+                paddingChanged = true;
+                invalidateProperties();
+            }
+        }
+        ]]>
+    </fx:Script>
+    
+    <fx:Script>
+        <![CDATA[
+        /** 
+         * @private 
+         */     
+        private static const focusExclusions:Array = ["textDisplay"];
+
+        /**
+         *  @private
+         */
+        override public function get focusSkinExclusions():Array { return focusExclusions;};
+        ]]>
+    </fx:Script>
+    
+    <s:states>
+        <s:State name="normal"/>
+        <s:State name="disabled" stateGroups="disabledStates"/>
+        <s:State name="normalWithPrompt"/>
+        <s:State name="disabledWithPrompt" stateGroups="disabledStates"/>
+    </s:states>
+    
+    <!-- border --> 
+    <!--- @private -->
+    <s:Rect left="0" right="0" top="0" bottom="0" id="border">
+        <s:stroke>     
+            <!--- @private -->
+            <s:SolidColorStroke id="borderStroke" weight="1" />
+        </s:stroke>
+    </s:Rect>
+
+    <!-- fill -->
+    <!--- Defines the appearance of the TextInput component's background. -->
+    <s:Rect id="background" left="1" right="1" top="1" bottom="1">
+        <s:fill>
+            <!--- @private Defines the background fill color. -->
+            <s:SolidColor id="bgFill" color="0xFFFFFF" />
+        </s:fill>
+    </s:Rect>
+    
+    <!-- shadow -->
+    <!--- @private -->
+    <s:Rect left="1" top="1" right="1" height="1" id="shadow">
+        <s:fill>
+            <s:SolidColor color="0x000000" alpha="0.12" />
+        </s:fill>
+    </s:Rect>
+    
+    <!-- text -->
+    <!--- @copy spark.components.supportClasses.SkinnableTextBase#textDisplay -->
+    <s:RichEditableText id="textDisplay"
+              verticalAlign="bottom"
+              widthInChars="10"
+              left="1" right="1" top="1" bottom="1" />
+    <!--- Defines the Label that is used for prompt text. The includeInLayout property is false so the prompt text does not affect measurement. -->
+    <s:Label id="promptDisplay" maxDisplayedLines="1"
+                verticalAlign="middle"
+                mouseEnabled="false" mouseChildren="false"
+                includeIn="normalWithPrompt,disabledWithPrompt" 
+                includeInLayout="false"
+                />
+
+</s:SparkSkin>

+ 36 - 0
gkaq/gis-flex/trunk/src/com/skins/SkinnableContainerSkin.mxml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" 
+			 xmlns:s="library://ns.adobe.com/flex/spark" 
+			 xmlns:mx="library://ns.adobe.com/flex/mx" >
+	<fx:Declarations>
+		<!-- 将非可视元素(例如服务、值对象)放在此处 -->
+	</fx:Declarations>
+	<s:states>
+		<s:State name="normal"/>
+		<s:State name="disabled"/>
+	</s:states>
+	<s:Rect height="100%" width="100%" alpha="1" >
+		<s:fill>
+			<s:LinearGradient rotation="90">
+				<!--s:GradientEntry color="#12b601" alpha="1" ratio="0"/-->
+				<s:GradientEntry color="#3c93b6" alpha="1" ratio="0"/>
+				<s:GradientEntry color="#46a3c4" alpha="1" ratio="1"/>
+			</s:LinearGradient>
+		</s:fill> 
+		
+	</s:Rect>
+	<s:Rect height="25" width="100%" alpha="1">
+		<s:fill>
+			<s:LinearGradient rotation="90">
+				<!--s:GradientEntry color="#12b601" alpha="1" ratio="0"/-->
+				<s:GradientEntry color="#98c5d5" alpha="1" ratio="0"/>
+				<s:GradientEntry color="#3c8fb2" alpha="1" ratio="1"/>
+			</s:LinearGradient>
+		</s:fill>
+	</s:Rect>
+	<s:Group id="contentGroup" left="0" right="0" bottom="0" top="0" alpha="1"   >
+		<s:layout >
+			<s:BasicLayout/>
+		</s:layout>
+	</s:Group>
+</s:SparkSkin>

+ 255 - 0
gkaq/gis-flex/trunk/src/com/skins/TextInputSkin.mxml

@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+    ADOBE SYSTEMS INCORPORATED
+    Copyright 2008 Adobe Systems Incorporated
+    All Rights Reserved.
+
+    NOTICE: Adobe permits you to use, modify, and distribute this file
+    in accordance with the terms of the license agreement accompanying it.
+
+-->
+<!--- The default skin class for Spark TextInput component.  
+
+     @see spark.components.TextInput
+        
+      @langversion 3.0
+      @playerversion Flash 10
+      @playerversion AIR 1.5
+      @productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+    xmlns:fb="http://ns.adobe.com/flashbuilder/2009" 
+    alpha.disabledStates="0.5" blendMode="normal">
+
+    <fx:Metadata>
+    <![CDATA[ 
+        /** 
+         * @copy spark.skins.spark.ApplicationSkin#hostComponent
+         */
+        [HostComponent("spark.components.TextInput")]
+    ]]>
+    </fx:Metadata> 
+    
+    <fx:Script fb:purpose="styling">
+        <![CDATA[
+        import mx.core.FlexVersion;
+        
+        private var paddingChanged:Boolean;
+        
+        /* Define the skin elements that should not be colorized. */
+        static private const exclusions:Array = ["background", "textDisplay", "promptDisplay", "border"];
+        
+        /* exclusions before Flex 4.5 for backwards-compatibility purposes */
+        static private const exclusions_4_0:Array = ["background", "textDisplay", "promptDisplay"];
+        
+        /**
+         * @private
+         */
+        override public function get colorizeExclusions():Array 
+        {
+            // Since border is styleable via borderColor, no need to allow chromeColor to affect
+            // the border.  This is wrapped in a compatibility flag since this change was added  
+            // in Flex 4.5
+            if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_5)
+            {
+                return exclusions_4_0;
+            }
+            
+            return exclusions;
+        }
+        
+        /* Define the content fill items that should be colored by the "contentBackgroundColor" style. */
+        static private const contentFill:Array = ["bgFill"];
+
+        /**
+         *  @private
+         */
+        override public function get contentItems():Array {return contentFill};
+        
+        /**
+         *  @private
+         */
+        override protected function commitProperties():void
+        {
+            super.commitProperties();
+            
+            if (paddingChanged)
+            {
+                updatePadding();
+                paddingChanged = false;
+            }
+        }
+        
+        /**
+         * @private
+         */
+        override protected function initializationComplete():void
+        {
+            useChromeColor = true;
+            super.initializationComplete();
+        }
+        
+        /**
+         *  @private
+         */
+        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+        {
+            if (getStyle("borderVisible") == true)
+            {
+                border.visible = true;
+                shadow.visible = true;
+                background.left = background.top = background.right = background.bottom = 1;
+                textDisplay.left = textDisplay.top = textDisplay.right = textDisplay.bottom = 1;
+                if (promptDisplay)
+                {
+                    promptDisplay.setLayoutBoundsSize(unscaledWidth - 2, unscaledHeight - 2);
+                    promptDisplay.setLayoutBoundsPosition(1, 1);
+                }
+            }
+            else
+            {
+                border.visible = false;
+                shadow.visible = false;
+                background.left = background.top = background.right = background.bottom = 0;
+                textDisplay.left = textDisplay.top = textDisplay.right = textDisplay.bottom = 0;
+                if (promptDisplay)
+                {
+                    promptDisplay.setLayoutBoundsSize(unscaledWidth, unscaledHeight);
+                    promptDisplay.setLayoutBoundsPosition(0, 0);
+                }
+            }
+            
+            borderStroke.color = getStyle("borderColor");
+            borderStroke.alpha = getStyle("borderAlpha");
+            
+            super.updateDisplayList(unscaledWidth, unscaledHeight);
+        }
+
+        /**
+         *  @private
+         */
+        private function updatePadding():void
+        {
+            if (!textDisplay)
+                return;
+            
+            // Push padding styles into the textDisplay
+            var padding:Number;
+            
+            padding = getStyle("paddingLeft");
+            if (textDisplay.getStyle("paddingLeft") != padding)
+                textDisplay.setStyle("paddingLeft", padding);
+            
+            padding = getStyle("paddingTop");
+            if (textDisplay.getStyle("paddingTop") != padding)
+                textDisplay.setStyle("paddingTop", padding);
+            
+            padding = getStyle("paddingRight");
+            if (textDisplay.getStyle("paddingRight") != padding)
+                textDisplay.setStyle("paddingRight", padding);
+            
+            padding = getStyle("paddingBottom");
+            if (textDisplay.getStyle("paddingBottom") != padding)
+                textDisplay.setStyle("paddingBottom", padding);
+            
+            if (!promptDisplay)
+                return;
+            
+            padding = getStyle("paddingLeft");
+            if (promptDisplay.getStyle("paddingLeft") != padding)
+                promptDisplay.setStyle("paddingLeft", padding);
+            
+            padding = getStyle("paddingTop");
+            if (promptDisplay.getStyle("paddingTop") != padding)
+                promptDisplay.setStyle("paddingTop", padding);
+            
+            padding = getStyle("paddingRight");
+            if (promptDisplay.getStyle("paddingRight") != padding)
+                promptDisplay.setStyle("paddingRight", padding);
+            
+            padding = getStyle("paddingBottom");
+            if (promptDisplay.getStyle("paddingBottom") != padding)
+                promptDisplay.setStyle("paddingBottom", padding);
+        }
+        
+        /**
+         *  @private
+         */
+        override public function styleChanged(styleProp:String):void
+        {
+            var allStyles:Boolean = !styleProp || styleProp == "styleName";
+
+            super.styleChanged(styleProp);
+            
+            if (allStyles || styleProp.indexOf("padding") == 0)
+            {
+                paddingChanged = true;
+                invalidateProperties();
+            }
+        }
+        ]]>
+    </fx:Script>
+    
+    <fx:Script>
+        <![CDATA[
+        /** 
+         * @private 
+         */     
+        private static const focusExclusions:Array = ["textDisplay"];
+
+        /**
+         *  @private
+         */
+        override public function get focusSkinExclusions():Array { return focusExclusions;};
+        ]]>
+    </fx:Script>
+    
+    <s:states>
+        <s:State name="normal"/>
+        <s:State name="disabled" stateGroups="disabledStates"/>
+        <s:State name="normalWithPrompt"/>
+        <s:State name="disabledWithPrompt" stateGroups="disabledStates"/>
+    </s:states>
+    
+    <!-- border --> 
+    <!--- @private -->
+    <s:Rect left="0" right="0" top="0" bottom="0" id="border">
+        <s:stroke>     
+            <!--- @private -->
+            <s:SolidColorStroke id="borderStroke" weight="1" />
+        </s:stroke>
+    </s:Rect>
+
+    <!-- fill -->
+    <!--- Defines the appearance of the TextInput component's background. -->
+    <s:Rect id="background" left="1" right="1" top="1" bottom="1">
+        <s:fill>
+            <!--- @private Defines the background fill color. -->
+            <s:SolidColor id="bgFill" color="0xFFFFFF" />
+        </s:fill>
+    </s:Rect>
+    
+    <!-- shadow -->
+    <!--- @private -->
+    <s:Rect left="1" top="1" right="1" height="1" id="shadow">
+        <s:fill>
+            <s:SolidColor color="0x000000" alpha="0.12" />
+        </s:fill>
+    </s:Rect>
+    
+    <!-- text -->
+    <!--- @copy spark.components.supportClasses.SkinnableTextBase#textDisplay -->
+    <s:RichEditableText id="textDisplay"
+              verticalAlign="middle"
+              widthInChars="10"
+              left="1" right="1" top="1" bottom="1" />
+    <!--- Defines the Label that is used for prompt text. The includeInLayout property is false so the prompt text does not affect measurement. -->
+    <s:Label id="promptDisplay" maxDisplayedLines="1"
+                verticalAlign="middle"
+                mouseEnabled="false" mouseChildren="false"
+                includeIn="normalWithPrompt,disabledWithPrompt" 
+                includeInLayout="false"
+                />
+
+</s:SparkSkin>

+ 299 - 0
gkaq/gis-flex/trunk/src/com/skins/TitleWinSkin.mxml

@@ -0,0 +1,299 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+ADOBE SYSTEMS INCORPORATED
+Copyright 2008 Adobe Systems Incorporated
+All Rights Reserved.
+
+NOTICE: Adobe permits you to use, modify, and distribute this file
+in accordance with the terms of the license agreement accompanying it.
+
+-->
+
+<!--- The default skin class for a Spark TitleWindow container.  
+
+@see spark.skins.spark.TitleWindowCloseButtonSkin
+@see spark.components.TitleWindow
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
+			 xmlns:fb="http://ns.adobe.com/flashbuilder/2009" blendMode="normal" mouseEnabled="false"
+			 minWidth="76" minHeight="76" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5">
+	
+	<fx:Metadata>
+		<![CDATA[ 
+		/** 
+		* @copy spark.skins.spark.ApplicationSkin#hostComponent
+		*/
+		[HostComponent("spark.components.TitleWindow")]
+		]]>
+	</fx:Metadata> 
+	
+	<fx:Script fb:purpose="styling">
+		<![CDATA[
+			import mx.core.FlexVersion;
+			
+			/* Define the skin elements that should not be colorized. 
+			For panel, border and title background are skinned, but the content area, background, border, and title text are not. */
+			static private const exclusions:Array = ["background", "titleDisplay", "contentGroup", "border"];
+			
+			/* exclusions before Flex 4.5 for backwards-compatibility purposes */
+			static private const exclusions_4_0:Array = ["background", "titleDisplay", "contentGroup"];
+			
+			/**
+			 * @private
+			 */
+			override public function get colorizeExclusions():Array 
+			{
+				// Since border is styleable via borderColor, no need to allow chromeColor to affect
+				// the border.  This is wrapped in a compatibility flag since this change was added  
+				// in Flex 4.5
+				if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_5)
+				{
+					return exclusions_4_0;
+				}
+				
+				return exclusions;
+			}
+			
+			/**
+			 * @private
+			 */
+			override protected function initializationComplete():void
+			{
+				useChromeColor = true;
+				super.initializationComplete();
+			}
+			
+			/**
+			 * @private
+			 */
+			override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+			{
+				if (getStyle("borderVisible") == true)
+				{
+					border.visible = true;
+					background.left = background.top = background.right = background.bottom = 1;
+					contents.left = contents.top = contents.right = contents.bottom = 1;
+				}
+				else
+				{
+					border.visible = false;
+					background.left = background.top = background.right = background.bottom = 0;
+					contents.left = contents.top = contents.right = contents.bottom = 0;
+				}
+				
+				dropShadow.visible = getStyle("dropShadowVisible");
+				
+				var cr:Number = getStyle("cornerRadius");
+				var withControls:Boolean = 
+					(currentState == "disabledWithControlBar" || 
+						currentState == "normalWithControlBar" ||
+						currentState == "inactiveWithControlBar");
+				
+				if (cornerRadius != cr)
+				{
+					cornerRadius = cr;
+					
+					dropShadow.tlRadius = cornerRadius;
+					dropShadow.trRadius = cornerRadius;
+					dropShadow.blRadius = withControls ? cornerRadius : 0;
+					dropShadow.brRadius = withControls ? cornerRadius : 0;
+					
+					setPartCornerRadii(topMaskRect, withControls); 
+					setPartCornerRadii(border, withControls); 
+					setPartCornerRadii(background, withControls);
+				}
+				
+				if (bottomMaskRect) setPartCornerRadii(bottomMaskRect, withControls); 
+				
+				borderStroke.color = getStyle("borderColor");
+				borderStroke.alpha = getStyle("borderAlpha");
+				backgroundFill.color = getStyle("backgroundColor");
+				backgroundFill.alpha = getStyle("backgroundAlpha");
+				
+				super.updateDisplayList(unscaledWidth, unscaledHeight);
+			}
+			
+			/**
+			 * @private
+			 */  
+			private function setPartCornerRadii(target:Rect, includeBottom:Boolean):void
+			{            
+				target.topLeftRadiusX = cornerRadius;
+				target.topRightRadiusX = cornerRadius;
+				target.bottomLeftRadiusX = includeBottom ? cornerRadius : 0;
+				target.bottomRightRadiusX = includeBottom ? cornerRadius : 0;
+			}
+			
+			private var cornerRadius:Number;
+		]]>
+	</fx:Script>
+	
+	<s:states>
+		<s:State name="normal" />
+		<s:State name="inactive" stateGroups="inactiveGroup" />
+		<s:State name="disabled" />
+		<s:State name="normalWithControlBar" stateGroups="withControls" />
+		<s:State name="inactiveWithControlBar" stateGroups="withControls, inactiveGroup" />
+		<s:State name="disabledWithControlBar" stateGroups="withControls" />
+	</s:states>
+	
+	<!--- drop shadow can't be hittable so it stays sibling of other graphics @private-->
+	<s:RectangularDropShadow id="dropShadow" blurX="20" blurY="20" alpha="0.32" 
+							 alpha.inactiveGroup="0.22" distance="11"  distance.inactiveGroup="7"
+							 angle="90" color="0x000000" left="0" top="0" right="0" bottom="0"/>
+	
+	<!--- drop shadow can't be hittable so all other graphics go in this group -->
+	<s:Group left="0" right="0" top="0" bottom="0" >
+		
+		<!--- top group mask @private-->
+		<s:Group left="1" top="1" right="1" bottom="1" id="topGroupMask">
+			<!--- @private-->
+			<s:Rect id="topMaskRect" left="0" top="0" right="0" bottom="0">
+				<s:fill>
+					<s:SolidColor alpha="0"/>
+				</s:fill>
+			</s:Rect>
+		</s:Group>
+		
+		<!--- bottom group mask @private-->
+		<s:Group left="1" top="1" right="1" bottom="1" id="bottomGroupMask" 
+				 includeIn="withControls">
+			<!--- @private-->
+			<s:Rect id="bottomMaskRect" left="0" top="0" right="0" bottom="0">
+				<s:fill>
+					<s:SolidColor alpha="0"/>
+				</s:fill>
+			</s:Rect>
+		</s:Group>
+		
+		<!--- layer 1: border @private -->
+		<s:Rect id="border" left="0" right="0" top="0" bottom="0" >
+			<s:stroke>
+				<!--- Defines the TitleWindowSkin class's border stroke. The default value is 1. -->
+				<s:SolidColorStroke id="borderStroke" weight="1" />
+			</s:stroke>
+		</s:Rect>
+		
+		<!-- layer 2: background fill -->
+		<!--- Defines the appearance of the TitleWindowSkin class's background. -->
+		<s:Rect id="background" left="1" top="1" right="1" bottom="1">
+			<s:fill>
+				<!--- Defines the TitleWindowSkin class's background fill. The default color is 0xFFFFFF. -->
+				<s:SolidColor id="backgroundFill" color="#FFFFFF"/>
+			</s:fill>
+		</s:Rect>
+		
+		<!-- layer 3: contents -->
+		<!--- Contains the vertical stack of title bar content and control bar. -->
+		<s:Group left="1" right="1" top="1" bottom="1" id="contents">
+			<s:layout>
+				<s:VerticalLayout gap="0" horizontalAlign="justify" />
+			</s:layout>
+			<!--- @private -->
+			<s:Group id="topGroup" mask="{topGroupMask}" alpha.inactiveGroup=".5">
+				
+				<!--- layer 0: title bar fill @private -->
+				<s:Rect id="tbFill" left="0" right="0" top="0" bottom="0">
+					<s:fill>
+						<s:LinearGradient rotation="90">
+							<s:GradientEntry color="#1f8b9b" alpha="0.8"/>
+							<s:GradientEntry color="#1f8b9b" />
+							<s:GradientEntry color="#1f8b9b" alpha="0.8"/>
+						</s:LinearGradient>
+					</s:fill>
+				</s:Rect>
+				
+				<!--- layer 1: title bar highlight @private -->
+				<s:Rect id="tbHilite" left="0" right="0" top="0" bottom="0">
+					
+					<s:fill>
+						<s:LinearGradient rotation="90">
+							<s:GradientEntry color="0xFFFFFF" alpha="0.15" />
+							<s:GradientEntry color="0xFFFFFF" alpha="0.15" ratio="0.44"/>
+							<s:GradientEntry color="0xFFFFFF" alpha="0" ratio="0.4401"/>
+						</s:LinearGradient>
+					</s:fill>
+				</s:Rect>
+				
+				<!--- layer 2: title bar divider @private -->
+				<s:Rect id="tbDiv" left="0" right="0" height="0" bottom="0">
+					<s:fill>
+						<s:SolidColor color="0xFFFFFF" alpha="0.75" />
+					</s:fill>
+				</s:Rect>
+				
+				<!-- layer 3: text -->
+				<!--- @copy spark.components.Panel#titleDisplay -->
+				<s:Label id="titleDisplay" maxDisplayedLines="1"
+						 left="9" right="36" top="1" bottom="0" minHeight="30" fontFamily="宋体"
+						 verticalAlign="middle" fontWeight="bold" color="white" fontSize="14"/>
+				
+				<!-- layer 4: moveArea -->
+				<!--- @copy spark.components.TitleWindow#moveArea -->
+				<s:Group id="moveArea" left="0" right="0" top="0" bottom="0" />
+				
+				<!--- @copy spark.components.TitleWindow#closeButton -->
+				<s:Button id="closeButton" skinClass="spark.skins.spark.TitleWindowCloseButtonSkin"
+						  width="15" height="15" right="7" top="7" />
+			</s:Group>
+			
+			<!--
+			Note: setting the minimum size to 0 here so that changes to the host component's
+			size will not be thwarted by this skin part's minimum size.   This is a compromise,
+			more about it here: http://bugs.adobe.com/jira/browse/SDK-21143
+			-->
+			<!--- @copy spark.components.SkinnableContainer#contentGroup -->
+			<s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0">
+			</s:Group>
+			
+			<!--- @private -->
+			<s:Group id="bottomGroup" minWidth="0" minHeight="0" 
+					 includeIn="withControls">  
+				
+				<s:Group left="0" right="0" top="0" bottom="0" mask="{bottomGroupMask}">
+					
+					<!-- layer 0: control bar divider line -->
+					<s:Rect left="0" right="0" top="0" height="1" alpha="0.22">
+						<s:fill>
+							<s:SolidColor color="0x000000" />
+						</s:fill>
+					</s:Rect>
+					
+					<!-- layer 1: control bar highlight -->
+					<s:Rect left="0" right="0" top="1" bottom="0">
+						<s:stroke>
+							<s:LinearGradientStroke rotation="90" weight="1">
+								<s:GradientEntry color="0xFFFFFF" />
+								<s:GradientEntry color="0xD8D8D8" />
+							</s:LinearGradientStroke>
+						</s:stroke>
+					</s:Rect>
+					
+					<!-- layer 2: control bar fill -->
+					<s:Rect left="1" right="1" top="2" bottom="1">
+						<s:fill>
+							<s:LinearGradient rotation="90">
+								<s:GradientEntry color="0xEDEDED"/>
+								<s:GradientEntry color="0xCDCDCD"/>
+							</s:LinearGradient>
+						</s:fill>
+					</s:Rect>
+				</s:Group>
+				
+				<!--- @copy spark.components.Panel#controlBarGroup -->
+				<s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0">
+					<s:layout>
+						<s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />
+					</s:layout>
+				</s:Group>
+			</s:Group>
+		</s:Group>
+	</s:Group>
+</s:SparkSkin>

+ 112 - 0
gkaq/gis-flex/trunk/src/com/skins/TitleWindowCloseButtonSkin.mxml

@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+    ADOBE SYSTEMS INCORPORATED
+    Copyright 2008 Adobe Systems Incorporated
+    All Rights Reserved.
+
+    NOTICE: Adobe permits you to use, modify, and distribute this file
+    in accordance with the terms of the license agreement accompanying it.
+
+-->
+
+<!--- The default skin class for the Spark Button component.  
+
+       @see spark.components.Button
+        
+      @langversion 3.0
+      @playerversion Flash 10
+      @playerversion AIR 1.5
+      @productversion Flex 4
+-->
+<s:SparkButtonSkin xmlns:fx="http://ns.adobe.com/mxml/2009" 
+             xmlns:s="library://ns.adobe.com/flex/spark" 
+             xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
+             minWidth="21" minHeight="21" 
+             alpha.disabled="0.5">
+     
+    <fx:Metadata>
+        <![CDATA[ 
+        /** 
+         * @copy spark.skins.spark.ApplicationSkin#hostComponent
+         */
+        [HostComponent("spark.components.Button")]
+        ]]>
+    </fx:Metadata>
+    
+    <fx:Script fb:purpose="styling">
+        <![CDATA[         
+            import spark.components.Group;
+            /* Define the skin elements that should not be colorized. 
+            For button, the graphics are colorized but the label is not. */
+            static private const exclusions:Array = ["labelDisplay"];
+            
+            /** 
+             * @private
+             */     
+            override public function get colorizeExclusions():Array {return exclusions;}
+            
+            /**
+             * @private
+             */
+            override protected function initializationComplete():void
+            {
+                useChromeColor = true;
+                super.initializationComplete();
+            }  
+            
+            /**
+             *  @private
+             */
+            override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+            {
+                var cr:Number = getStyle("cornerRadius");
+                
+                if (cornerRadius != cr)
+                {
+                    cornerRadius = cr;
+                    fill.radiusX = cornerRadius;
+                }
+                
+                
+                super.updateDisplayList(unscaledWidth, unscaledHeight);
+            }
+            
+            private var cornerRadius:Number = 2;
+                                 
+        ]]>        
+    </fx:Script>
+        
+    <!-- states -->
+    <s:states>
+        <s:State name="up" />
+        <s:State name="over" />
+        <s:State name="down" />
+        <s:State name="disabled" />
+		<s:State name="normal"/>
+    </s:states>
+    
+    <!-- layer 2: fill -->
+    <!--- @private -->
+    <s:Rect id="fill" left="1" right="1" top="1" bottom="1" radiusX="2">
+		<s:fill>
+			<s:BitmapFill  
+				source.up="@Embed('/images/yjpt/list/close.png')" 
+				source.down="@Embed('/images/yjpt/list/close_hover.png')" 
+				source.disabled="@Embed('/images/yjpt/list/close.png')"
+				source.over="@Embed('/images/yjpt/list/close_hover.png')"/>
+		</s:fill>
+    </s:Rect>
+
+    
+    <!-- layer 8: text -->
+    <!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay  -->
+    <s:Label id="labelDisplay"
+             textAlign="center"
+             maxDisplayedLines="1"
+             horizontalCenter="0" verticalCenter="1" verticalAlign="middle"
+             left="10" right="10" top="2" bottom="2">
+    </s:Label>
+    
+</s:SparkButtonSkin>

+ 27 - 0
gkaq/gis-flex/trunk/src/com/utils/AnyResponse.as

@@ -0,0 +1,27 @@
+package com.utils
+{
+	import mx.rpc.IResponder;
+	
+	public class AnyResponse implements IResponder
+	{
+		private var resultFunction:Function;
+		private var faultFunction:Function;
+		public function AnyResponse(resultF:Function,faultF:Function = null):void
+		{
+			resultFunction = resultF;
+			faultFunction = faultF;
+		}
+		
+		public function result(data:Object):void
+		{
+			if(resultFunction != null)
+				resultFunction(data);
+		}
+		
+		public function fault(info:Object):void
+		{
+			if(faultFunction != null)
+				faultFunction(info);
+		}
+	}
+}

+ 99 - 0
gkaq/gis-flex/trunk/src/com/utils/CommonUtility.as

@@ -0,0 +1,99 @@
+package com.utils
+{
+	import com.adobe.cairngorm.business.ServiceLocator;
+	import com.supermap.web.core.Element;
+	import com.supermap.web.core.Feature;
+	import com.supermap.web.core.Point2D;
+	import com.supermap.web.core.Rectangle2D;
+	import com.supermap.web.core.geometry.GeoPoint;
+	import com.supermap.web.core.geometry.GeoRegion;
+	import com.supermap.web.core.styles.PictureMarkerStyle;
+	import com.supermap.web.core.styles.PredefinedFillStyle;
+	import com.supermap.web.core.styles.PredefinedLineStyle;
+	import com.supermap.web.mapping.ElementsLayer;
+	import com.supermap.web.mapping.Map;
+	import com.supermap.web.mapping.TiledDynamicRESTLayer;
+	
+	import flash.display.DisplayObject;
+	
+	import mx.charts.ColumnChart;
+	import mx.collections.ArrayCollection;
+	import mx.collections.ArrayList;
+	import mx.containers.Grid;
+	import mx.containers.GridItem;
+	import mx.containers.GridRow;
+	import mx.containers.utilityClasses.ConstraintColumn;
+	import mx.controls.Alert;
+	import mx.controls.Label;
+	import mx.core.FlexGlobals;
+	import mx.effects.Fade;
+	import mx.managers.CursorManager;
+	import mx.managers.PopUpManager;
+	import mx.resources.ResourceManager;
+	import mx.rpc.AbstractOperation;
+	import mx.rpc.AsyncToken;
+	import mx.rpc.events.FaultEvent;
+	import mx.rpc.events.ResultEvent;
+	import mx.rpc.remoting.RemoteObject;
+	
+	import spark.components.BorderContainer;
+	import spark.components.TitleWindow;
+	import spark.effects.Scale;
+
+	
+	public class CommonUtility
+	{
+		public function CommonUtility()
+		{
+		}
+		public static function showTitleWindow(win:TitleWindow,model:Boolean = true,x:Number = -1,y:Number = -1):void
+		{
+			PopUpManager.addPopUp(win,DisplayObject(FlexGlobals.topLevelApplication),model);
+			PopUpManager.centerPopUp(win);
+			if(x > 0 && y > 0)
+			{
+				win.x = x;
+				win.y = y;
+			}
+			var scale:Scale = new Scale();
+			scale.autoCenterTransform = true;    //设置以中心点缩放
+			scale.target = win;    //设置Scale的作用对象为windowView
+			scale.duration = 500;      //设置效果的持续时间
+			scale.scaleXFrom = 0;      //设置scaleX和scaleY的起始,终点大小
+			scale.scaleXTo = 1;
+			scale.scaleYFrom = 0;
+			scale.scaleYTo = 1;
+			scale.play();
+		}		
+		public static function callRemote(svr:String,method:String,listener:Function,... args:Array):void
+		{
+			try
+			{
+				var ro:RemoteObject = ServiceLocator.getInstance().getRemoteObject(svr) as RemoteObject;
+				
+				var op:AbstractOperation = ro.getOperation(method);
+				op.arguments = args;
+				CursorManager.setBusyCursor();
+				var o:AsyncToken = op.send();
+				o.addResponder(new AnyResponse(function resultCallback(r:ResultEvent):void
+				{
+					CursorManager.removeBusyCursor();
+					if(listener!=null)
+						listener(r);
+				}
+					,faultError));
+			}catch(e:Error)
+			{
+				Alert.show(e.message.toString());
+			}
+		}
+		public static function faultError(e:Object):void
+		{
+			CursorManager.removeBusyCursor();
+			var f:FaultEvent = e as FaultEvent;
+			var s:String = f.message.toString();
+			Alert.show(ResourceManager.getInstance().getString("common","remoteCallFault"));
+			trace(s);
+		}
+	}
+}

+ 27 - 0
gkaq/gis-flex/trunk/src/com/utils/ServicesUtility.as

@@ -0,0 +1,27 @@
+package com.utils
+{
+	
+	import com.common.ConfigUtil;
+	
+	import mx.core.FlexGlobals;
+	
+	import spark.components.NavigatorContent;
+	
+	public class ServicesUtility
+	{
+		public function ServicesUtility()
+		{
+		}
+		
+		public static function getAnalystServiceUrl(serviceId:String = null):String
+		{
+			var serviceList:XMLList = FlexGlobals.topLevelApplication.mapConfig.AnalystServices.Service;
+			for each(var x:XML in serviceList)
+			{
+				return ConfigUtil.getRealUrl( x.@URL);
+			}
+			return null;
+		}
+		
+	}
+}

+ 63 - 0
gkaq/gis-flex/trunk/src/com/view/AqtcWindow.mxml

@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009" 
+			   xmlns:s="library://ns.adobe.com/flex/spark" 
+			   xmlns:mx="library://ns.adobe.com/flex/mx" width="240" height="450" creationComplete="init(event)" xmlns:view="com.view.*"
+			   close="windowCloseHandler(event)" title="安全系统图层" skinClass="com.view.yjcz.CxTitleWindow" windowMove="windowMoveFunction(event)" xmlns:tree="com.tree.*">
+	<s:layout>
+		<s:VerticalLayout/>
+	</s:layout>
+	<fx:Script>
+		<![CDATA[
+			import mx.collections.ArrayCollection;
+			import mx.collections.XMLListCollection;
+			import mx.core.ContainerCreationPolicy;
+			import mx.core.FlexGlobals;
+			import mx.core.UIComponent;
+			import mx.events.CloseEvent;
+			import mx.events.FlexEvent;
+			import mx.events.ResizeEvent;
+			import mx.managers.PopUpManager;
+			[Bindable]
+			public var menuXML:XML = null;
+			public var  checkBoxClickHandler:Function = null;
+			protected function windowCloseHandler(event:CloseEvent):void
+			{
+				PopUpManager.removePopUp(this);
+			}
+			protected function init(event:FlexEvent):void
+			{
+			}
+			protected function fieldTypeLabel(item:Object):String
+			{
+				if(null != item){
+					return resourceManager.getString('select',item.@localeName);
+				}
+				return "";
+			}
+			private function windowMoveFunction(event:Event):void
+			{
+				event.target.x = event.target.x < 0 ? 0 : event.target.x;
+				event.target.x = event.target.x + event.target.width > event.target.parent.width ? event.target.parent.width - event.target.width : event.target.x;
+				event.target.y = event.target.y < 0 ? 0 : event.target.y;
+				event.target.y = event.target.y + event.target.height > event.target.parent.height ? event.target.parent.height - event.target.height : event.target.y;
+			}
+			private function checkBox_click(event:Event):void
+			{
+				if(null != checkBoxClickHandler)
+				{
+					checkBoxClickHandler(event);
+				}
+			}
+		]]>
+	</fx:Script>
+	<fx:Declarations>
+		<!-- Place non-visual elements (e.g., services, value objects) here -->
+	</fx:Declarations>
+	<s:BorderContainer  width="100%" height="100%" borderColor="#6b9ca5" borderWeight="3" cornerRadius="5">
+		<tree:CheckLegendTree id="menuTree" width="100%" height="100%" borderVisible="false"
+							  defaultLeafIcon="{null}" disclosureClosedIcon="{null}" disclosureOpenIcon="{null}"
+							  dataProvider="{this.menuXML}" legendHeight="28" legendWidth="28" 
+							  labelField="@CDMC" legendField="@CDTB" checkBoxStateField="@STATE" legendType="ICON"
+							  itemClick="checkBox_click(event)" showRoot="false"/>
+	</s:BorderContainer>
+</s:TitleWindow>

+ 113 - 0
gkaq/gis-flex/trunk/src/com/view/Bw.mxml

@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		 xmlns:s="library://ns.adobe.com/flex/spark" 
+		 xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" minWidth="350" xmlns:view="com.view.*">
+	<fx:Declarations>
+		<!-- 将非可视元素(例如服务、值对象)放在此处 -->
+	</fx:Declarations>
+	<fx:Style>
+		@namespace s "library://ns.adobe.com/flex/spark";
+		@namespace mx "library://ns.adobe.com/flex/mx";
+		.lab{
+			fontWeight:normal;
+			fontFamily:微软雅黑;
+		}
+		.head{
+			fontWeight:bold;
+			fontFamily:微软雅黑;
+			textAlign:left;
+		}
+	</fx:Style>
+	<fx:Script>
+		<![CDATA[
+			import mx.collections.ArrayCollection;
+			import mx.events.CloseEvent;
+			import mx.managers.PopUpManager;
+			[Bindable]
+			public var smid:String;
+			[Bindable]
+			public var bwmc:String;
+			[Bindable]
+			public var jyrmc:String;
+			[Bindable]
+			public var szdmc:String;
+			[Bindable]
+			public var gqmc:String;
+			[Bindable]
+			public var bwcd:String;
+			[Bindable]
+			public var sjkpnl:String;
+			[Bindable]
+			public var nhwtgml:String;
+			[Bindable]
+			public var qysjsh:String;
+			[Bindable]
+			public var fwlxmc:String;
+			
+			[Bindable]
+			public var result:Object;
+			private  static var LABEL_LEN:int=160;
+			[Bindable]
+			public var  records:ArrayCollection=new ArrayCollection;
+		]]>
+	</fx:Script>
+	<s:Group width="100%" height="100%">
+		<s:Rect id="rect" top="0" bottom="0" left="0" right="0">
+			<s:fill>
+				<s:LinearGradient rotation="90">
+					<s:GradientEntry color="#F8F8F8"/>
+					<s:GradientEntry color="#ECECEC"/>
+				</s:LinearGradient>
+			</s:fill>
+		</s:Rect>
+	</s:Group>
+	<s:VGroup width="100%" height="100%" paddingLeft="5" paddingRight="5" paddingTop="5" paddingBottom="5">
+		<s:HGroup width="100%">
+			<s:Label text="泊位名称:" styleName="head" width="{LABEL_LEN}"/>
+			<s:Label text="{bwmc}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="经营人:" styleName="head" width="{LABEL_LEN}"/>
+			<s:Label text="{jyrmc}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="所在地:" styleName="head" width="{LABEL_LEN}"/>
+			<s:Label text="{szdmc}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="所在港区:" styleName="head" width="{LABEL_LEN}"/>
+			<s:Label text="{gqmc}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="泊位长度:" styleName="head" width="{LABEL_LEN}"/>
+			<s:Label text="{bwcd}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="设计靠泊能力(万吨):" styleName="head" width="{LABEL_LEN}"/>
+			<s:Label text="{sjkpnl}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="年货物通过能力(万吨):" styleName="head" width="{LABEL_LEN}"/>
+			<s:Label text="{nhwtgml}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="前沿设计水深(米):" styleName="head" width="{LABEL_LEN}"/>
+			<s:Label text="{qysjsh}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="泊位服务类型:" styleName="head" width="{LABEL_LEN}"/>
+			<s:Label text="{fwlxmc}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		
+		<s:DataGrid width="100%" height="100%" dataProvider="{records}">
+			<s:columns>
+				<s:ArrayList>
+					<s:GridColumn width="100" headerText="危险或物品名称" dataField="WXWPMC"/>
+					<s:GridColumn width="100" headerText="作业数量" dataField="ZYSL"  />
+					<view:DataGridColumn width="140" dataField="ZYSJQ"  dateFormatString="YYYY-MM-DD HH:NN:SS" headerText="作业时间"/>
+				</s:ArrayList>
+			</s:columns>
+		</s:DataGrid>
+	</s:VGroup>
+	
+</s:Group>

+ 143 - 0
gkaq/gis-flex/trunk/src/com/view/Ccss.mxml

@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		 xmlns:s="library://ns.adobe.com/flex/spark" 
+		 xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" minWidth="350">
+	<fx:Declarations>
+		<!-- 将非可视元素(例如服务、值对象)放在此处 -->
+	</fx:Declarations>
+	<fx:Style>
+		@namespace s "library://ns.adobe.com/flex/spark";
+		@namespace mx "library://ns.adobe.com/flex/mx";
+		.lab{
+			fontWeight:normal;
+			fontFamily:微软雅黑;
+		}
+		.head{
+			fontWeight:bold;
+			fontFamily:微软雅黑;
+			textAlign:left;
+		}
+	</fx:Style>
+	
+	<fx:Script>
+		<![CDATA[
+			import com.common.ConstUtil;
+			
+			import mx.collections.ArrayCollection;
+			import mx.controls.Text;
+			import mx.core.FlexGlobals;
+			import mx.events.CloseEvent;
+			import mx.managers.PopUpManager;
+			import mx.resources.IResourceManager;
+			import mx.resources.ResourceManager;
+			import mx.rpc.events.ResultEvent;
+			import com.utils.CommonUtility;
+			
+			[Bindable]
+			// 经营人ID
+			public var recordId:String;
+			[Bindable]
+			public var gqmc:String;
+			[Bindable]
+			// 港口经营人名称
+			public var gkjyr:String;
+			[Bindable]
+			public var rj:String;
+			[Bindable]
+			public var cg:String;
+			[Bindable]
+			public var wxygs:String;
+			[Bindable]
+			public var gs:String;
+			[Bindable]
+			public var zyhz:String;
+			[Bindable]
+			public var aqfzrlxdh:String;
+			[Bindable]
+			public var gkjyxkzh:String;
+			[Bindable]
+			public var zyfzbh:String;
+			protected var rm:IResourceManager = ResourceManager.getInstance();
+			private var yjwzWin:YjwzWindow  = new YjwzWindow;
+			public function showYjwz():void
+			{
+				CommonUtility.callRemote("gisController","queryWz",Yjpt_resultHandler,null,recordId);
+			}
+			protected function Yjpt_resultHandler(event:ResultEvent):void
+			{
+				var yjwz:ArrayCollection=event.result as ArrayCollection;
+				yjwzWin.list=yjwz;
+				PopUpManager.addPopUp(yjwzWin,FlexGlobals.topLevelApplication as DisplayObject,true);
+				PopUpManager.centerPopUp(yjwzWin);
+			}
+			public function showExpert():void
+			{
+				var expertWin:ExpertWindow =new ExpertWindow();
+				expertWin.dwmc = this.gkjyr;
+				PopUpManager.addPopUp(expertWin,FlexGlobals.topLevelApplication as DisplayObject,true);
+				PopUpManager.centerPopUp(expertWin);
+			}
+			public function showYjya():void
+			{
+				var yjyaView:YjyaViewWindow = new YjyaViewWindow;
+				yjyaView.jyrMC=gkjyr;
+				yjyaView.jyrID = recordId;
+				PopUpManager.addPopUp(yjyaView,FlexGlobals.topLevelApplication as DisplayObject,true);
+				PopUpManager.centerPopUp(yjyaView);
+			}
+		]]>
+	</fx:Script>
+	<s:Group width="100%" height="100%">
+		<s:Rect id="rect" top="0" bottom="0" left="0" right="0">
+			<s:fill>
+				<s:LinearGradient rotation="90">
+					<s:GradientEntry color="#F8F8F8"/>
+					<s:GradientEntry color="#ECECEC"/>
+				</s:LinearGradient>
+			</s:fill>
+		</s:Rect>
+	</s:Group>
+	<s:VGroup width="100%" height="100%" paddingLeft="5" paddingRight="5" paddingTop="5" paddingBottom="5">
+		<s:Label text="{gkjyr}" width="100%" fontFamily="微软雅黑" fontWeight="bold" fontSize="16"/>
+		<s:HGroup width="100%">
+			<s:Label text="安全负责人值班电话:" styleName="head" width="100%"/>
+			<s:Label text="{aqfzrlxdh}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="港区:" styleName="head" width="100%"/>
+			<s:Label text="{gqmc}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="总容量:" styleName="head" width="100%"/>
+			<s:Label text="{rj}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="储罐个数:" styleName="head" width="100%"/>
+			<s:Label text="{gs}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="型号*个数:" styleName="head" width="100%"/>
+			<s:Label text="{cg}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="重大危险源单元个数:" styleName="head" width="100%"/>
+			<s:Label text="{wxygs}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="主要货种:" styleName="head" width="100%"/>
+			<s:Label text="{zyhz}" fontFamily="微软雅黑" color="#FF3300" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="是否持有危险货物作业附证:" styleName="head" width="100%"/>
+			<s:Label text="{zyfzbh}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%" verticalAlign="middle">
+			<s:Spacer width="5" height="0"/>
+			<s:Image source="images/png/aq_yywzkMini.png" buttonMode="true" click="{showYjwz()}" toolTip="应急物资库"/>
+			<s:Spacer width="5" height="0"/>
+			<s:Image source="images/png/aq_expertMini.png" buttonMode="true" click="{showExpert()}" toolTip="应急专家库"/>
+			<s:Spacer width="5" height="0"/>
+			<s:Image source="images/png/aq_yjya.png" buttonMode="true" click="{showYjya()}" toolTip="应急预案"/>
+		</s:HGroup>
+	</s:VGroup>
+</s:Group>

+ 131 - 0
gkaq/gis-flex/trunk/src/com/view/Cg.mxml

@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		 xmlns:s="library://ns.adobe.com/flex/spark" 
+		 xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" minWidth="350"
+		 xmlns:view="com.view.*">
+	<fx:Declarations>
+		<!-- 将非可视元素(例如服务、值对象)放在此处 -->
+	</fx:Declarations>
+	<fx:Style>
+		@namespace s "library://ns.adobe.com/flex/spark";
+		@namespace mx "library://ns.adobe.com/flex/mx";
+		.lab{
+			fontWeight:normal;
+			fontFamily:微软雅黑;
+		}
+		.head{
+			fontWeight:bold;
+			fontFamily:微软雅黑;
+			textAlign:left;
+		}
+	</fx:Style>
+	<fx:Script>
+		<![CDATA[
+			import mx.collections.ArrayCollection;
+			import mx.controls.Alert;
+			import mx.controls.Image;
+			import mx.core.FlexGlobals;
+			import mx.events.CloseEvent;
+			import mx.events.FlexEvent;
+			import mx.managers.PopUpManager;
+			import mx.resources.IResourceManager;
+			import mx.resources.ResourceManager;
+			
+			protected var rm:IResourceManager = ResourceManager.getInstance();
+			
+			[Bindable]
+			public var  list:ArrayCollection=new ArrayCollection;
+			[Bindable]
+			public var jyrmc:String;
+			[Bindable]
+			public var gqmc:String;
+			/**
+			 * 查看理化特性
+			 */
+			protected function lhtx_clickHandler(record:Object):void
+			{
+				var img:PopImage = new PopImage;
+				img.load("images/temp/"+record.CGMC+".png");
+				img.defaultImage="images/temp/T-1501.png";
+				PopUpManager.addPopUp(img, FlexGlobals.topLevelApplication as DisplayObject, true);
+			}
+			protected function gzp_clickHandler(event:MouseEvent):void
+			{
+				var img:PopImage = new PopImage;
+				var url:String = encodeURI("images/temp/GZP_"+gqmc+".png");
+				img.load(url);
+				PopUpManager.addPopUp(img,FlexGlobals.topLevelApplication as DisplayObject, true);
+			}
+			/**
+			 * 是否显示
+			 */
+			public function showFile(record:Object):Boolean
+			{
+					return true;
+			}
+			/**
+			 * 附件名称
+			 */
+			public function showFileName(record:Object):String
+			{
+				return "查看";
+			}
+			private function cgczFunction(item:Object, column:GridColumn):String
+			{
+				if("1"==item.CGCZ){
+					return rm.getString("select","cgcz.tg");
+				}else if("2"==item.CGCZ){
+					return rm.getString("select","cgcz.bxg");
+				}
+				return item.CGCZ;
+			}			
+			private function cgwxFunction(item:Object, column:GridColumn):String
+			{
+				if("ws"==item.CGWX){
+					return "拱顶";
+				}else if("qxg"==item.CGWX){
+					return "球形罐";
+				}else if("qx"==item.CGWX){
+					return "内浮顶";
+				}else if("ls"==item.CGWX){
+					return "外浮顶";
+				}
+				return item.CGWX;
+			}
+		]]>
+	</fx:Script>
+	<s:Group width="100%" height="100%">
+		<s:Rect id="rect" top="0" bottom="0" left="0" right="0">
+			<s:fill>
+				<s:LinearGradient rotation="90">
+					<s:GradientEntry color="#F8F8F8"/>
+					<s:GradientEntry color="#ECECEC"/>
+				</s:LinearGradient>
+			</s:fill>
+		</s:Rect>
+	</s:Group>
+	<s:VGroup width="100%" height="100%" paddingLeft="5" paddingRight="5" paddingTop="5" paddingBottom="5">
+		<s:HGroup width="100%">
+			<s:Button label="告知牌" click="gzp_clickHandler(event)" />
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="港口经营人:" styleName="head" width="80"/>
+			<s:Label width="100%" styleName="lab" text="{jyrmc}" textAlign="left"/>
+			<s:Label text="罐区名称:" styleName="head" width="60"/>
+			<s:Label text="{gqmc}罐区" styleName="lab" width="100%" textAlign="left"/>
+		</s:HGroup>
+		<s:DataGrid id="dataGrid" width="100%" height="100%" dataProvider="{list}">
+			<s:columns>
+				<s:ArrayList>
+					<s:GridColumn dataField="CGMC" headerText="储罐名称"  dataTipField="WZFL" width="65" />
+					<s:GridColumn dataField="CGRJ" headerText="储罐容积"  dataTipField="CPMC" width="65"/>
+					<s:GridColumn dataField="CGCZ" headerText="储罐材质"  dataTipField="GGXH" width="65" labelFunction="cgczFunction"/>
+					<s:GridColumn dataField="CGWX" headerText="储罐外形"  dataTipField="SL" width="65" labelFunction="cgwxFunction"/>
+					<s:GridColumn dataField="HXPMC" headerText="化学品名称"  dataTipField="SLDW" width="120"/>
+					<view:DataGridColumn width="100" headerText="理化特性" type="{TypeBase.LINKBUTTON}" linkButtonFunc="{lhtx_clickHandler}"
+										 linkEnableFunc="{showFile}" linklabelFunc="{showFileName}"/>
+				</s:ArrayList>
+			</s:columns>
+		</s:DataGrid>
+	</s:VGroup>
+</s:Group>

+ 25 - 0
gkaq/gis-flex/trunk/src/com/view/CodeVo.as

@@ -0,0 +1,25 @@
+package com.view
+{	
+	import mx.resources.ResourceManager;
+	
+	[Bindable]
+	public class CodeVo
+	{
+		public var id:Number;// 主键ID
+		public var label:String;
+		public var code:String;
+		
+		public function get localeName():String
+		{
+			var lname:String = ResourceManager.getInstance().getString("select",label);
+			if(null == lname || lname=="")
+			{
+				lname = label;
+			}
+			return lname;
+		}
+		public function CodeVo()
+		{
+		}
+	}
+}

+ 178 - 0
gkaq/gis-flex/trunk/src/com/view/DataGridColumn.as

@@ -0,0 +1,178 @@
+package com.view
+{
+	import com.view.TypeBase;
+	import com.view.LinkButtonRenderer;
+	
+	import mx.core.ClassFactory;
+	import mx.formatters.DateFormatter;
+	
+	import spark.components.gridClasses.GridColumn;
+	
+	public class DataGridColumn extends GridColumn
+	{
+		private var _linkButtonFunc:Function;
+		private var _linkButtonLabel:String;
+		// 更换linkbutton标签
+		private var _linklabelFunc:Function;
+		// linkbutton是否可用
+		private var _linkEnableFunc:Function;
+		
+		/*********************多按钮事件********************************
+		 */
+		//删除按钮事件
+		private var _delFunction:Function;
+		//编辑按钮事件
+		private var _editFunction:Function;
+		//导出按钮事件
+		private var _exportFunction:Function;
+		
+		// 渲染器
+		private var _myRenderer:ClassFactory;
+		
+		private var _type:String;
+		private var _enabled:Boolean=false;
+		
+		public function DataGridColumn(columnName:String=null)
+		{
+			super(columnName);
+			editable = false;
+			sortable = false;
+			super.labelFunction = _commonLabelFunction;
+		}
+		
+		public function set enabled(val:Boolean):void
+		{
+			_enabled = val;
+			if(TypeBase.CHECKBOX == this.type)
+			{
+				_myRenderer.properties.enabled=_enabled;
+			}
+		}
+		
+		// 属性必须是全的
+		public function set type(colType:String):void
+		{
+			_type = colType;
+			if(TypeBase.LINKBUTTON == colType)
+			{
+				_myRenderer = new ClassFactory(LinkButtonRenderer);
+				_myRenderer.properties = {linkButtonFunc:_linkButtonFunc,
+										  linkLabel:_linkButtonLabel,
+										  labelFunc:_linklabelFunc,
+										  linkEnableFunc:_linkEnableFunc
+				};
+			}
+			this.itemRenderer = _myRenderer;
+		}
+		
+		public function get type():String
+		{
+			return _type;
+		}
+		
+		public function set linkButtonFunc(func:Function):void
+		{
+			_linkButtonFunc = func;
+			if(TypeBase.LINKBUTTON == this.type)
+			{
+				_myRenderer.properties.linkButtonFunc=_linkButtonFunc;
+			}
+		}
+		
+		public function set linklabelFunc(func:Function):void
+		{
+			_linklabelFunc = func;
+			if(TypeBase.LINKBUTTON == this.type)
+			{
+				_myRenderer.properties.labelFunc=_linklabelFunc;
+			}
+		}
+		
+		public function set linkEnableFunc(func:Function):void
+		{
+			_linkEnableFunc = func;
+			if(TypeBase.LINKBUTTON == this.type)
+			{
+				_myRenderer.properties.linkEnableFunc=_linkEnableFunc;
+			}
+		}
+		
+		public function set linkButtonLabel(label:String):void
+		{
+			_linkButtonLabel = label;
+			if(TypeBase.LINKBUTTON == this.type)
+			{
+				_myRenderer.properties.linkLabel=_linkButtonLabel;
+			}
+		}
+		
+		public function set delFunction(func:Function):void
+		{
+			_delFunction = func;
+			if(TypeBase.MULTIBUTTON == this.type)
+			{
+				_myRenderer.properties.delFunction=_delFunction;
+			}
+		}
+		
+		public function set editFunction(func:Function):void
+		{
+			_editFunction = func;
+			if(TypeBase.MULTIBUTTON == this.type)
+			{
+				_myRenderer.properties.editFunction=_editFunction;
+			}
+		}
+		
+		public function set exportFunction(func:Function):void
+		{
+			_exportFunction = func;
+			if(TypeBase.MULTIBUTTON == this.type)
+			{
+				_myRenderer.properties.exportFunction=_exportFunction;
+			}
+		}
+		/*
+		 * 使用labelFunction 处理日期 
+		 */
+		public var dateFormatString:String;
+		private var _labelFunction:Function;
+		private var _labelFnSetted:Boolean=false;
+		public var _commonLabelFunction:Function = function(item:Object, column:GridColumn):String{
+			if(column.dataField && item[column.dataField]){
+				return item[column.dataField].toString();
+			}else{
+				return null;
+			}
+		};
+		
+		override public function get labelFunction():Function
+		{
+			if(dateFormatString)
+				return formatDateLabel;
+			if(_labelFnSetted)
+				return _labelFunction;
+			return _commonLabelFunction;
+		}
+		
+		override public function set labelFunction(value:Function):void
+		{
+			// TODO Auto Generated method stub
+			_labelFunction = value;
+			_labelFnSetted = true;
+		}
+		
+		/* 处理日期格式 */
+		public function formatDateLabel(item:Object, column:GridColumn):String{
+			var dateStr:String = null;
+			var value:Object = item[column.dataField];
+			if(value && value is Date){
+				var df:DateFormatter = new DateFormatter();
+				df.formatString=dateFormatString;
+				dateStr = df.format(value);
+			}
+			return dateStr;
+		}
+		
+	}
+}

+ 187 - 0
gkaq/gis-flex/trunk/src/com/view/ExpertWindow.mxml

@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
+			   xmlns:s="library://ns.adobe.com/flex/spark"
+			   xmlns:mx="library://ns.adobe.com/flex/mx"
+			   width="800"  close="windowCloseHandler(event)" windowMove="windowMoveFunction(event)"
+			   creationComplete="creationCompleteHandler(event)" title="专家列表"  xmlns:view="com.view.*" skinClass="com.view.yjcz.CxTitleWindow">
+	<s:layout>
+		<s:VerticalLayout/>
+	</s:layout>
+	<fx:Script>
+		<![CDATA[
+			import mx.collections.ArrayCollection;
+			import mx.events.CloseEvent;
+			import mx.events.FlexEvent;
+			import mx.managers.PopUpManager;
+			import mx.resources.IResourceManager;
+			import mx.resources.ResourceManager;
+			import mx.rpc.events.ResultEvent;
+			import com.utils.CommonUtility;
+			
+
+			protected var rm:IResourceManager = ResourceManager.getInstance();
+			[Bindable]  
+			private var szdArray:ArrayCollection;
+			[Bindable]  
+			private var blankCode:CodeVo;
+			[Bindable]
+			public var  records:ArrayCollection=new ArrayCollection;
+			private var _dwmc:String;
+			private var init:Boolean = false;
+			private var _szd:Number = 0;
+			[Bindable]
+			public function get szd():Number
+			{
+				return _szd;
+			}
+			public function set szd(value:Number):void
+			{
+				_szd = value;
+				if(init){
+					this.query_szd.selectedID=value;
+				}
+			}
+			public function get dwmc():String
+			{
+				return _dwmc;
+			}
+
+			public function set dwmc(value:String):void
+			{
+				_dwmc = value;
+				if(init){
+					if(value)
+					{
+						this.query_szd.visible = false;
+						this.query_szd.includeInLayout = false;
+						this.query_szdLabel.visible = false;
+						this.query_szdLabel.includeInLayout = false;
+					}else{
+						this.query_szd.visible = true;
+						this.query_szd.includeInLayout = true;
+						this.query_szdLabel.visible = true;
+						this.query_szdLabel.includeInLayout = true;
+					}
+				}
+			}
+
+			protected function windowCloseHandler(event:CloseEvent):void
+			{
+				PopUpManager.removePopUp(this);
+			}
+			
+			protected function creationCompleteHandler(event:FlexEvent):void
+			{ 
+				// 指定了危险源ID时不显示所在地条件
+				if(this._dwmc)
+				{
+					this.query_szd.visible = false;
+					this.query_szd.includeInLayout = false;
+					this.query_szdLabel.visible = false;
+					this.query_szdLabel.includeInLayout = false;
+				}else{
+					this.query_szd.visible = true;
+					this.query_szd.includeInLayout = true;
+					this.query_szdLabel.visible = true;
+					this.query_szdLabel.includeInLayout = true;
+				}
+				this.query_szd.selectedID=szd;
+				blankCode= new CodeVo();
+				blankCode.id=900;
+				blankCode.code="";
+				blankCode.label="江苏省";
+				this.init = true;
+				doSearch();
+			}
+			protected function resultHandler(event:ResultEvent):void
+			{
+				var ret:ArrayCollection=event.result as ArrayCollection;
+				this.records = ret;
+			}
+			public function doSearch():void
+			{
+				if(!this.init)
+				{
+					return;
+				}
+				var name:String = query_name.text;
+				var szd:Number = query_szd.selectedID;
+				var sfgkj:String="Y";
+				if(this._dwmc){
+					sfgkj = "N";
+				}
+				CommonUtility.callRemote("gisController","searchExpert",resultHandler,name,szd,sfgkj,this._dwmc);
+			}
+			private function dhFunction(item:Object, column:GridColumn):String
+			{
+				if(item.GZDH){
+					return item.GZDH;
+				}
+				return item.JTDH;
+			}
+			private function nlFunction(item:Object, column:GridColumn):String
+			{
+				return null==item.CSNY?"":(new Date().fullYear-item.CSNY.fullYear).toString();
+			}			
+			private function xbFunction(item:Object, column:GridColumn):String
+			{
+				if("M"==item.XB){
+					return rm.getString("select","sex.male");
+				}else if("F"==item.XB){
+					return rm.getString("select","sex.female");
+				}
+				return item.XB;
+			}
+			private function szdFunction(item:Object, column:GridColumn):String
+			{
+				return rm.getString("select",item.SZDMC);
+			}
+			private function ywtcFunction(item:Object, column:GridColumn):String
+			{
+				return rm.getString("select",item.ZCLBMC);
+			}
+			protected function search_clickHandler(event:MouseEvent = null,type:String = null):void
+			{
+				doSearch();
+			}
+			private function windowMoveFunction(event:Event):void
+			{
+				event.target.x = event.target.x < 0 ? 0 : event.target.x;
+				event.target.x = event.target.x + event.target.width > event.target.parent.width ? event.target.parent.width - event.target.width : event.target.x;
+				event.target.y = event.target.y < 0 ? 0 : event.target.y;
+				event.target.y = event.target.y + event.target.height > event.target.parent.height ? event.target.parent.height - event.target.height : event.target.y;
+			}
+		]]>
+	</fx:Script>
+	<fx:Declarations>
+		<!-- Place non-visual elements (e.g., services, value objects) here -->
+	</fx:Declarations>
+	<s:HGroup width="100%" height="40" minHeight="40" gap="0" horizontalAlign="left"
+			  verticalAlign="middle">
+		<s:Spacer width="2" height="0"/>
+		<s:Label width="30" styleName="head" text="名称" textAlign="right" />
+		<s:TextInput  id="query_name"/>
+		<s:Spacer width="10" height="0"/>
+		<s:Label id="query_szdLabel" width="40" styleName="head" text="所在地" textAlign="right"/>
+		<view:Selector id="query_szd"  param="type=province" textAlign="left" width="180" hasBlank="true" selectedID="0" blankCode="{blankCode}" code="SZD" />
+		<s:Spacer width="15" height="0"/>
+		<s:Image source="images/png/aq_searchMini.png" buttonMode="true" click="search_clickHandler(event)"/>
+	</s:HGroup>
+	<s:DataGrid width="100%"  dataProvider="{records}"  >
+		<s:columns>
+			<s:ArrayList>
+				<s:GridColumn width="100" headerText="姓名" dataField="XM"/>
+				<s:GridColumn width="100" headerText="业务特长"  labelFunction="ywtcFunction"/>
+				<s:GridColumn width="100" headerText="性别" dataField="XB" labelFunction="xbFunction"/>
+				<s:GridColumn width="100" headerText="年龄" labelFunction="nlFunction"/>
+				<s:GridColumn width="100" headerText="工作单位" dataField="GZDW"/>
+				<s:GridColumn width="100" headerText="技术职称" dataField="JSZC"/>
+				<s:GridColumn width="100" headerText="专业" dataField="SXZY"/>
+				<s:GridColumn width="100" headerText="现从事专业" dataField="XCSZY"/>
+				<s:GridColumn width="100" headerText="电话" labelFunction="dhFunction"/>
+				<s:GridColumn width="100" headerText="现居住地" dataField="XJZD"/>
+				<s:GridColumn width="100" headerText="所在地" labelFunction="szdFunction"/>
+			</s:ArrayList>
+		</s:columns>
+	</s:DataGrid>
+</s:TitleWindow>

+ 40 - 0
gkaq/gis-flex/trunk/src/com/view/LinkButtonRenderer.mxml

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
+						  xmlns:s="library://ns.adobe.com/flex/spark" 
+						  xmlns:mx="library://ns.adobe.com/flex/mx" 
+						  focusEnabled="true" width="100%">
+	
+	<fx:Script>
+		<![CDATA[
+			
+			public var linkButtonFunc:Function;
+			public var linkEnableFunc:Function;
+			public var labelFunc:Function;
+			[Bindable]
+			public var linkLabel:String;
+			
+			override public function set data(value:Object):void
+			{
+				super.data = value;
+				if(value!=null)
+				{
+					if(labelFunc!=null)
+					{
+						linkLabel=labelFunc(value);
+					}
+				}
+			}
+			
+			override protected function updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void
+			{
+				super.updateDisplayList(unscaledWidth,unscaledHeight);
+				linkbutton.move(0,0);
+				linkbutton.setActualSize(unscaledWidth,unscaledHeight);
+			}
+			
+		]]>
+	</fx:Script>
+	
+	<mx:LinkButton id="linkbutton" top="0" left="0" right="0" textDecoration="underline" width="100%"
+				   bottom="0" label="{linkLabel}" enabled="{linkEnableFunc(data)}" click="{linkButtonFunc(data)}" />
+</s:GridItemRenderer>

+ 38 - 0
gkaq/gis-flex/trunk/src/com/view/PopImage.mxml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mx:Image xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		  xmlns:s="library://ns.adobe.com/flex/spark" 
+		  xmlns:mx="library://ns.adobe.com/flex/mx" click="img_click(event)" complete="img_complete(event)" ioError="image1_ioErrorHandler(event)">
+	
+	<fx:Script>
+		<![CDATA[
+			import mx.collections.ArrayCollection;
+			import mx.controls.Image;
+			import mx.events.CloseEvent;
+			import mx.events.FlexEvent;
+			import mx.managers.PopUpManager;
+			public var defaultImage:String;
+			protected function img_click(event:MouseEvent):void
+			{
+				var img:Image = event.currentTarget as Image;
+				PopUpManager.removePopUp(img);
+			}
+			private function img_complete(evt:Event):void {
+				var img:Image = evt.currentTarget as Image;
+				img.width = img.contentWidth;
+				img.height = img.contentHeight;
+				PopUpManager.centerPopUp(img);
+			}
+			
+			protected function image1_ioErrorHandler(event:IOErrorEvent):void
+			{
+				// TODO Auto-generated method stub
+				super.source = defaultImage;
+			}
+			
+		]]>
+	</fx:Script>
+	
+	<fx:Declarations>
+		<!-- Place non-visual elements (e.g., services, value objects) here -->
+	</fx:Declarations>
+</mx:Image>

+ 26 - 0
gkaq/gis-flex/trunk/src/com/view/QskGrid.mxml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		 xmlns:s="library://ns.adobe.com/flex/spark" 
+		 xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" minWidth="500" maxHeight="300">
+	<fx:Declarations>
+		<!-- 将非可视元素(例如服务、值对象)放在此处 -->
+	</fx:Declarations>
+	<fx:Script>
+		<![CDATA[
+			import mx.collections.ArrayCollection;
+			[Bindable]
+			public var  list:ArrayCollection=new ArrayCollection;
+		]]>
+	</fx:Script>
+	<s:DataGrid width="100%" height="100%" dataProvider="{list}">
+		<s:columns>
+			<s:ArrayList>
+				<s:GridColumn dataField="QSKMC" headerText="取水口名称" showDataTips="true" dataTipField="QSKMC" width="100"/>
+				<s:GridColumn dataField="GLDW" headerText="管理单位" showDataTips="true" dataTipField="GLDW" width="100"/>
+				<s:GridColumn dataField="LXDH" headerText="联系电话" showDataTips="true" dataTipField="LXDH" width="100"/>
+				<s:GridColumn dataField="PJQSL" headerText="平均取水量(吨/天)" showDataTips="true" dataTipField="PJQSL" width="100"/>
+				<s:GridColumn dataField="YT" headerText="用途" showDataTips="true" dataTipField="YT" width="100"/>
+			</s:ArrayList>
+		</s:columns>
+	</s:DataGrid>
+</s:Group>

+ 189 - 0
gkaq/gis-flex/trunk/src/com/view/Selector.as

@@ -0,0 +1,189 @@
+package com.view
+{
+	import com.skins.ComboBoxButtonSkin;
+	
+	import mx.collections.ArrayCollection;
+	import mx.events.FlexEvent;
+	import mx.resources.ResourceManager;
+	import mx.rpc.events.ResultEvent;
+	import com.utils.CommonUtility;
+	
+	import spark.components.ComboBox;
+	import spark.events.IndexChangeEvent;
+	import spark.events.ListEvent;
+	
+	public class Selector extends ComboBox
+	{
+		// 控件对应的公用代码
+		private var _code:String;
+		private var _selectedID:Number=-1;
+		private var _selectedCode:String;
+		// 上级ID
+		private var _param:String;
+		public var hasBlank:Boolean=false;
+		public var blankCode:CodeVo;
+		
+		public function Selector()
+		{
+			super();
+			this.width=300;
+			this.labelFunction = codeLabelFunction;
+			this.height=28;
+			super.setStyle("fontWeight", "normal");
+			super.setStyle("openDuration", "0");
+			super.setStyle("closeDuration", "0");
+			super.setStyle("selectionDuration", "0");
+			this.addEventListener(IndexChangeEvent.CHANGE,onChangeHandler);
+			this.addEventListener(FlexEvent.CREATION_COMPLETE,creationCompleteHandler);
+		}
+
+
+		public function get param():String
+		{
+			return _param;
+		}
+
+		public function set param(value:String):void
+		{
+			_param = value;
+		}
+
+		protected function Yjpt_resultHandler(event:ResultEvent):void
+		{
+			var ret:ArrayCollection=event.result as ArrayCollection;
+			var codes:ArrayCollection = new ArrayCollection;
+			for each(var r:Object in ret)
+			{
+				var c:CodeVo = new CodeVo;
+				c.id = r.ID;
+				c.code = r.CODE;
+				c.label = r.MC;
+				codes.addItem(c);
+			}
+			this.dataProvider = codes;
+			if(this.hasBlank)
+			{
+				if(!blankCode){
+					blankCode= new CodeVo();
+					blankCode.id=0;
+					blankCode.label="";
+					blankCode.code="";
+				}
+				this.dataProvider.addItemAt(blankCode,0);
+			}
+			if(null != codes && codes.length>0)
+			{
+				for each(var code:CodeVo in codes)
+				{
+					if(code.id == selectedID)
+					{
+						this.selectedItem = code;
+						break;
+					}
+				}
+			}
+		}
+
+		protected function creationCompleteHandler(event:FlexEvent):void
+		{
+			this.textInput.editable = false;
+			this.textInput.setStyle("borderColor","#D2D2D2");
+			this.openButton.setStyle("skinClass",ComboBoxButtonSkin);
+			CommonUtility.callRemote("gisController","getCodeGroup",Yjpt_resultHandler,code,param);
+		}
+
+		public function onChangeHandler(e:IndexChangeEvent):void
+		{
+			if(e.newIndex <0)
+			{
+				return;
+			}
+			var code:CodeVo = this.dataProvider.getItemAt(e.newIndex) as CodeVo;
+			this._selectedID = code.id;
+			this._selectedCode = code.label;
+		}
+		/**
+		 * 树图标签显示
+		 */
+		public function codeLabelFunction(item:Object):String
+		{   
+			if(item ==null)
+			{
+				return "";
+			}
+			var _functionName:String=resourceManager.getString("select",item.label);
+			if(null == _functionName || _functionName=="")
+			{
+				_functionName = item.label;
+			}
+			return _functionName;
+		} 
+		public function get code():String
+		{
+			return _code;
+		}
+		
+		public function set code(value:String):void
+		{
+			_code = value;
+		}
+		public function get selectedCode():String
+		{
+			return _selectedCode;
+		}
+		
+		public function set selectedCode(value:String):void
+		{
+			_selectedCode = value;
+			if(_selectedCode==null){
+				this.selectedItem = null;
+				this.textInput.text="";
+				return;
+			}
+			var codes:ArrayCollection = this.dataProvider as ArrayCollection;
+			if(null != codes && codes.length>0)
+			{
+				for each(var code:CodeVo in codes)
+				{
+					if(code.code == value)
+					{
+						this.selectedItem = code;
+						return;
+					}
+				}
+			}
+			this.selectedItem = null;
+		}
+		/** 选中项 */
+		public function get selectedID():Number
+		{
+			return _selectedID;
+		}
+		
+		/**
+		 * @private
+		 */
+		public function set selectedID(value:Number):void
+		{
+			_selectedID = value;
+			if(_selectedID==-1){
+				this.selectedItem = null;
+				this.textInput.text="";
+				return;
+			}
+			var codes:ArrayCollection = this.dataProvider as ArrayCollection;
+			if(null != codes && codes.length>0)
+			{
+				for each(var code:CodeVo in codes)
+				{
+					if(code.id == value)
+					{
+						this.selectedItem = code;
+						return;
+					}
+				}
+			}
+			this.selectedItem = null;
+		}
+	}
+}

+ 259 - 0
gkaq/gis-flex/trunk/src/com/view/TreeItemLinesRenderer.as

@@ -0,0 +1,259 @@
+package com.view
+{
+	import flash.display.BitmapData; 
+	import flash.display.Graphics; 
+	
+	import mx.collections.ICollectionView; 
+	import mx.collections.IList; 
+	import mx.controls.Tree; 
+	import mx.controls.treeClasses.ITreeDataDescriptor; 
+	import mx.controls.treeClasses.TreeItemRenderer; 
+	
+	
+	/** 
+	 * Alpha value for the Tree lines. 
+	 * @default 1 
+	 */ 
+	[Style(name="lineAlpha", type="Number", format="Length", inherit="no")] 
+	
+	/** 
+	 * Color of the Tree lines. 
+	 * @default 0x808080 
+	 */ 
+	[Style(name="lineColor", type="uint", format="Color", inherit="no")] 
+	
+	/** 
+	 * Thickness value for the Tree lines. 
+	 * @default 1 
+	 */ 
+	[Style(name="lineThickness", type="Number", format="Length", inherit="no")] 
+	
+	/** 
+	 * The Tree line style - none, dotted (default), or solid. 
+	 * @default "dotted" 
+	 */ 
+	[Style(name="lineStyle", type="String", enumeration="solid", inherit="no")] 
+	
+	/** 
+	 * Extends TreeItemRenderer to draw the dotted lines of the tree. 
+	 * It supports 3 line styles - dotted (default), solid, or none. 
+	 * And the tree line color, alpha, and thickness values are configurable styles too. 
+	 * 
+	 * <pre> 
+	 * <ui:TreeItemLinesRenderer 
+	 * <b>Styles</b> 
+	 * lineAlpha="1" 
+	 * lineColor="#808080" 
+	 * lineThickness="1" 
+	 * lineStyle="dotted" 
+	 * > 
+	 * ... 
+	 * <i>child tags</i> 
+	 * ... 
+	 * </ui:TreeItemLinesRenderer> 
+	 * </pre> 
+	 * 
+	 * @author Chris Callendar 
+	 * @date April 20th, 2009 
+	 */ 
+	public class TreeItemLinesRenderer extends TreeItemRenderer 
+	{ 
+		
+		public static const DOTTED:String = "dotted"; // default 
+		public static const SOLID:String = "solid"; 
+		public static const NONE:String = "none"; 
+		
+		public function TreeItemLinesRenderer() { 
+			super(); 
+		} 
+		
+		override public function set data(value:Object):void { 
+			super.data = value; 
+		} 
+		
+		override protected function updateDisplayList(w:Number, h:Number):void { 
+			super.updateDisplayList(w, h); 
+			
+			if ((w > 0) && (h > 0)) { 
+				// go up the hierarchy, drawing the vertical dotted lines for each node 
+				var tree:Tree = (owner as Tree); 
+				var desc:ITreeDataDescriptor = tree.dataDescriptor; 
+				var currentNode:Object = data; 
+				var parentNode:Object = tree.getParentItem(currentNode); 
+				// the level is zero at this node, then increases as we go up the tree 
+				var levelsUp:int = 0; 
+				
+				var lineStyle:String = getStyle("solid"); 
+				var lineColor:uint = getColorStyle("lineColor", 0x808080); 
+				var lineAlpha:Number = getNumberStyle("lineAlpha", 1); 
+				var lineThickness:Number = getNumberStyle("lineThickness", 1); 
+				var indentation:Number = tree.getStyle("indentation"); 
+				
+				// move the icon and label over to make room for the lines (less for root nodes) 
+				var shift:int = (parentNode == null ? 2 : 6) + lineThickness; 
+				if (icon) { 
+					icon.move(icon.x + shift, icon.y); 
+				} 
+				if (label) { 
+					label.move(label.x + shift, label.y); 
+				} 
+				
+				var g:Graphics = graphics; 
+				g.clear(); 
+				
+				if ((lineStyle != NONE) && (lineAlpha > 0) && (lineThickness > 0)) { 
+					while (parentNode != null) { 
+						var children:ICollectionView = desc.getChildren(parentNode); 
+						if (children is IList) { 
+							var itemIndex:int = (children as IList).getItemIndex(currentNode); 
+							// if this node is the last child of the parent 
+							var isLast:Boolean = (itemIndex == (children.length - 1)); 
+							drawLines(g, w, h, lineStyle, lineColor, lineAlpha, lineThickness, isLast, levelsUp, indentation); 
+							
+							// go up to the parent, increasing the level 
+							levelsUp++; 
+							currentNode = parentNode; 
+							parentNode = tree.getParentItem(parentNode); 
+						} else { 
+							break; 
+						} 
+					} 
+				} 
+			} 
+		} 
+		
+		protected function drawLines(g:Graphics, w:Number, h:Number, lineStyle:String, lineColor:uint, 
+									 lineAlpha:Number, lineThickness:Number, isLastItem:Boolean, levelsUp:int, indentation:Number):void { 
+			var midY:Number = Math.round(h / 2); 
+			var lineX:Number = 0; 
+			if (disclosureIcon) { 
+				lineX = disclosureIcon.x + (disclosureIcon.width / 2); 
+			} else if (icon) { 
+				lineX = icon.x - 8; 
+			} else if (label) { 
+				lineX = label.x - 8; 
+			} 
+			lineX = Math.floor(lineX) - int(lineThickness / 2); 
+			// adjust the x position based on the indentation 
+			if (levelsUp > 0) { 
+				if (!isNaN(indentation) && (indentation > 0)) { 
+					lineX = lineX - (levelsUp * indentation); 
+				} else { 
+					// Invalid indentation style value 
+					return; 
+				} 
+			} 
+			var lineY:Number = h; 
+			// stop the dotted line halfway on the last item 
+			if (isLastItem) { 
+				lineY = midY; 
+				// no lines need to be drawn for parents of the last item 
+				if (levelsUp > 0) { 
+					return; 
+				} 
+			} 
+			
+			g.lineStyle(0, 0, 0); 
+			if (lineStyle == SOLID) { 
+				g.beginFill(lineColor, lineAlpha); 
+			} else { 
+				var verticalDottedLine:BitmapData = createDottedLine(lineColor, lineAlpha, lineThickness, true); 
+				g.beginBitmapFill(verticalDottedLine); 
+			} 
+			
+			// draw the vertical line 
+			g.drawRect(lineX, 0, lineThickness, lineY); 
+			// end the fill and start it again otherwise the lines overlap and it create white squares 
+			g.endFill(); 
+			
+			// draw the horizontal line - only needed on this node (not on any parents) 
+			if (levelsUp == 0) { 
+				var startX:int = lineX + 1 + int(lineThickness / 2); 
+				var endX:int = startX + 11; // 5 dots 
+				if (isLastItem) { 
+					startX = lineX; 
+				} 
+				var startY:Number = midY - int(lineThickness / 2); 
+				if (lineStyle == SOLID) { 
+					g.beginFill(lineColor, lineAlpha); 
+				} else { 
+					var horizontalDottedLine:BitmapData = createDottedLine(lineColor, lineAlpha, lineThickness, false); 
+					g.beginBitmapFill(horizontalDottedLine); 
+				} 
+				g.drawRect(startX, startY, endX - startX, lineThickness); 
+				g.endFill(); 
+			} 
+			
+		} 
+		
+		/** 
+		 * Creates a BitmapData that is used to renderer a dotted line. 
+		 * If the vertical parameter is true, then it creates a rectangle bitmap that is 
+		 * twice as long as it is wide (lineThickness). Otherwise it creates a rectangle 
+		 * that is twice as wide as it is long. 
+		 * The first half of the rectangle is filled with the line color (and alpha value), 
+		 * then second half is transparent. 
+		 */ 
+		private function createDottedLine(lineColor:uint, lineAlpha:Number, lineThickness:Number, 
+										  vertical:Boolean = true):BitmapData { 
+			var w:Number = (vertical ? lineThickness : 2 * lineThickness); 
+			var h:Number = (vertical ? 2 * lineThickness : lineThickness); 
+			var color32:uint = combineColorAndAlpha(lineColor, lineAlpha); 
+			var dottedLine:BitmapData = new BitmapData(w, h, true, 0x00ffffff); 
+			// create a dotted bitmap 
+			for (var i:int = 0; i < lineThickness; i++) { 
+				for (var j:int = 0; j < lineThickness; j++) { 
+					dottedLine.setPixel32(i, j, color32); 
+				} 
+			} 
+			return dottedLine; 
+		} 
+		
+		/** 
+		 * Combines the color value and the alpha value into a 32 bit uint like #AARRGGBB. 
+		 */ 
+		private function combineColorAndAlpha(color:uint, alpha:Number):uint { 
+			// make sure the alpha is a valid number [0-1] 
+			if (isNaN(alpha)) { 
+				alpha = 1; 
+			} else { 
+				alpha = Math.max(0, Math.min(1, alpha)); 
+			} 
+			
+			// convert the [0-1] alpha value into [0-255] 
+			var alphaColor:Number = alpha * 255; 
+			// bitshift it to come before the color 
+			alphaColor = alphaColor << 24; 
+			// combine the two values: #AARRGGBB 
+			var combined:uint = alphaColor | color; 
+			return combined; 
+		} 
+		
+		private function getColorStyle(propName:String, defaultValue:uint):uint { 
+			var color:uint = defaultValue; 
+			if (propName != null) { 
+				var n:Number = getStyle(propName); 
+				if (!isNaN(n)) { 
+					color = uint(n); 
+				} 
+			} 
+			return color; 
+		} 
+		
+		
+		private function getNumberStyle(propName:String, defaultValue:Number):Number { 
+			var number:Number = defaultValue; 
+			if (propName != null) { 
+				var n:Number = getStyle(propName); 
+				if (!isNaN(n)) { 
+					number = n; 
+				} 
+			} 
+			return number; 
+		} 
+		
+	} 
+	
+	
+	
+}

+ 22 - 0
gkaq/gis-flex/trunk/src/com/view/TreeWithLines.as

@@ -0,0 +1,22 @@
+package com.view
+{
+	import mx.controls.Tree;
+	import mx.core.ClassFactory;
+	
+	public class TreeWithLines extends Tree
+	{
+		public function TreeWithLines()
+		{
+			super();
+		}
+		
+		override protected function createChildren():void
+		{
+			var myfactory:ClassFactory=new ClassFactory(TreeItemLinesRenderer);
+			this.itemRenderer=myfactory;
+			super.createChildren();
+		}
+		
+		
+	}
+}

+ 34 - 0
gkaq/gis-flex/trunk/src/com/view/TypeBase.as

@@ -0,0 +1,34 @@
+package com.view
+{
+	[Bindable]
+	public class TypeBase
+	{
+		public function TypeBase()
+		{
+		}
+		
+		public static function isNumberType(t:String):Boolean
+		{
+			return t!=null&&(t==DOUBLE||t==INT);
+		}
+		
+		public static var DT_FMT_1:String="YYYY-MM-DD";
+		public static var DT_RESTRICT_1:String="0-9\\-";
+		
+		//type
+		public static var DOUBLE:String = "double";
+		public static var INT:String = "int";
+		public static var EMAIL:String="email";
+		public static var EN:String="en";
+		public static var CN:String="cn";
+		
+		public static var EN_RESTRICT:String="a-zA-Z0-9~!@#$%\\^&*()_+=\\-:;'<>,./?\\\&quot;`[]{}|' '";
+		public static var INT_RESTRICT:String="0-9";
+		public static var NUM_RESTRICT:String="0-9.";
+		public static var EMAIL_RESTRICT:String="a-zA-Z0-9.@_\\-";
+		
+		public static var CHECKBOX:String = "checkbox";
+		public static var LINKBUTTON:String = "linkbutton";
+		public static var MULTIBUTTON:String = "multibutton";
+	}
+}

+ 24 - 0
gkaq/gis-flex/trunk/src/com/view/VideoTitleWindow.mxml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009" 
+			   xmlns:s="library://ns.adobe.com/flex/spark" 
+			   xmlns:mx="library://ns.adobe.com/flex/mx" 
+			   skinClass="com.skins.TitleWinSkin"
+			   close="{PopUpManager.removePopUp(this);}"
+			   title="视频"
+			   width="400" height="300">
+	<fx:Script>
+		<![CDATA[
+			import mx.managers.PopUpManager;
+			
+			public function play(name:String):void
+			{
+				this.player.source = "images/video/" + name;
+				this.player.play();
+			}
+		]]> 
+	</fx:Script>
+	<fx:Declarations>
+		<!-- 将非可视元素(例如服务、值对象)放在此处 -->
+	</fx:Declarations> 
+	<s:VideoPlayer id="player" source="images/sp.mp4" width="100%" height="100%"/>
+</s:TitleWindow>

+ 145 - 0
gkaq/gis-flex/trunk/src/com/view/Whqy.mxml

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		 xmlns:s="library://ns.adobe.com/flex/spark" 
+		 xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" minWidth="350">
+	<fx:Declarations>
+		<!-- 将非可视元素(例如服务、值对象)放在此处 -->
+	</fx:Declarations>
+	<fx:Style>
+		@namespace s "library://ns.adobe.com/flex/spark";
+		@namespace mx "library://ns.adobe.com/flex/mx";
+		.lab{
+			fontWeight:normal;
+			fontFamily:微软雅黑;
+		}
+		.head{
+			fontWeight:bold;
+			fontFamily:微软雅黑;
+			textAlign:left;
+		}
+	</fx:Style>
+	<fx:Script>
+		<![CDATA[
+			import com.common.ConstUtil;
+			
+			import mx.collections.ArrayCollection;
+			import mx.core.FlexGlobals;
+			import mx.events.CloseEvent;
+			import mx.managers.PopUpManager;
+			import mx.resources.IResourceManager;
+			import mx.resources.ResourceManager;
+			import mx.rpc.events.ResultEvent;
+			import com.utils.CommonUtility;
+			
+			[Bindable]
+			// 经营人ID
+			public var recordId:String;
+			[Bindable]
+			public var gqmc:String;
+			[Bindable]
+			public var gkjyr:String;
+			[Bindable]
+			public var bwmc:String;
+			[Bindable]
+			public var hckpnl:String;
+			[Bindable]
+			public var ttl:String;
+			[Bindable]
+			public var mtmc:String;
+			[Bindable]
+			public var zyhz:String;
+			[Bindable]
+			public var aqfzrlxdh:String;
+			[Bindable]
+			public var gkjyxkzh:String;
+			[Bindable]
+			public var zyfzbh:String;
+
+			public function showExpert():void
+			{
+				var expertWin:ExpertWindow =new ExpertWindow();
+				expertWin.dwmc = this.gkjyr;
+				PopUpManager.addPopUp(expertWin,FlexGlobals.topLevelApplication as DisplayObject,true);
+				PopUpManager.centerPopUp(expertWin);
+			}
+			public function showYjya():void
+			{
+				var yjyaView:YjyaViewWindow = new YjyaViewWindow;
+				yjyaView.jyrMC=gkjyr;
+				yjyaView.jyrID = recordId;
+				PopUpManager.addPopUp(yjyaView,FlexGlobals.topLevelApplication as DisplayObject,true);
+				PopUpManager.centerPopUp(yjyaView);
+			}
+			protected var rm:IResourceManager = ResourceManager.getInstance();
+			private var yjwzWin:YjwzWindow  = new YjwzWindow;
+			public function showYjwz():void
+			{
+				CommonUtility.callRemote("gisController","yjwz_jyr",Yjpt_resultHandler,recordId);
+			}
+			protected function Yjpt_resultHandler(event:ResultEvent):void
+			{
+				var yjwz:ArrayCollection=event.result as ArrayCollection;
+				yjwzWin.list=yjwz;
+				PopUpManager.addPopUp(yjwzWin,FlexGlobals.topLevelApplication as DisplayObject,true);
+				PopUpManager.centerPopUp(yjwzWin);
+			}
+		]]>
+	</fx:Script>
+	<s:Group width="100%" height="100%">
+		<s:Rect id="rect" top="0" bottom="0" left="0" right="0">
+			<s:fill>
+				<s:LinearGradient rotation="90">
+					<s:GradientEntry color="#F8F8F8"/>
+					<s:GradientEntry color="#ECECEC"/>
+				</s:LinearGradient>
+			</s:fill>
+		</s:Rect>
+	</s:Group>
+	<s:VGroup width="100%" height="100%" paddingLeft="5" paddingRight="5" paddingTop="5" paddingBottom="5">
+		<s:Label text="{gkjyr}" width="100%" fontFamily="微软雅黑" fontWeight="bold" fontSize="16"/>
+		<s:HGroup width="100%">
+			<s:Label text="安全负责人值班电话:" styleName="head" width="100%"/>
+			<s:Label text="{aqfzrlxdh}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="港区" styleName="head" width="100%"/>
+			<s:Label text="{gqmc}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="码头名称" styleName="head" width="100%"/>
+			<s:Label text="{mtmc}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="泊位名称" styleName="head" width="100%"/>
+			<s:Label text="{bwmc}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="建设规模" styleName="head" width="100%"/>
+			<s:Label text="{hckpnl}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="年吞吐量(万吨)" styleName="head" width="100%"/>
+			<s:Label text="{ttl}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="经营许可证号" styleName="head" width="100%"/>
+			<s:Label text="{gkjyxkzh}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="是否持有危险货物作业附证" styleName="head" width="100%"/>
+			<s:Label text="{zyfzbh}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="主要作业货种" styleName="head" width="100%"/>
+			<s:Label text="{zyhz}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%" verticalAlign="middle">
+			<s:Spacer width="5" height="0"/>
+			<s:Image source="images/png/aq_yywzkMini.png" buttonMode="true" click="{showYjwz()}" toolTip="应急物资库"/>
+			<s:Spacer width="5" height="0"/>
+			<s:Image source="images/png/aq_expertMini.png" buttonMode="true" click="{showExpert()}" toolTip="应急专家库"/>
+			<s:Spacer width="5" height="0"/>
+			<s:Image source="images/png/aq_yjya.png" buttonMode="true" click="{showYjya()}" toolTip="应急预案"/>
+		</s:HGroup>
+	</s:VGroup>
+</s:Group>

+ 73 - 0
gkaq/gis-flex/trunk/src/com/view/Yjwl.mxml

@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		 xmlns:s="library://ns.adobe.com/flex/spark" 
+		 xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" minWidth="350">
+	<fx:Declarations>
+		<!-- 将非可视元素(例如服务、值对象)放在此处 -->
+	</fx:Declarations>
+	<fx:Style>
+		@namespace s "library://ns.adobe.com/flex/spark";
+		@namespace mx "library://ns.adobe.com/flex/mx";
+		.lab{
+			fontWeight:normal;
+			fontFamily:微软雅黑;
+		}
+		.head{
+			fontWeight:bold;
+			fontFamily:微软雅黑;
+			textAlign:left;
+		}
+	</fx:Style>
+	<fx:Script>
+		<![CDATA[
+			import mx.events.CloseEvent;
+			import mx.managers.PopUpManager;
+			[Bindable]
+			public var yjwlName:String;
+			[Bindable]
+			public var szd:String;
+			[Bindable]
+			public var gq:String;
+			[Bindable]
+			public var address:String;
+			[Bindable]
+			public var tel:String;
+			[Bindable]
+			public var remark:String;
+
+		]]>
+	</fx:Script>
+	<s:Group width="100%" height="100%">
+		<s:Rect id="rect" top="0" bottom="0" left="0" right="0">
+			<s:fill>
+				<s:LinearGradient rotation="90">
+					<s:GradientEntry color="#F8F8F8"/>
+					<s:GradientEntry color="#ECECEC"/>
+				</s:LinearGradient>
+			</s:fill>
+		</s:Rect>
+	</s:Group>
+	<s:VGroup width="100%" height="100%" paddingLeft="5" paddingRight="5" paddingTop="5" paddingBottom="5">
+		<s:Label text="{yjwlName}" width="100%" fontFamily="微软雅黑" fontWeight="bold" fontSize="16"/>
+		<s:HGroup width="100%">
+			<s:Label text="所在地" styleName="head" width="100%"/>
+			<s:Label text="{szd}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="港区" styleName="head" width="100%"/>
+			<s:Label text="{gq}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="地址" styleName="head" width="100%"/>
+			<s:Label text="{address}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="电话" styleName="head" width="100%"/>
+			<s:Label text="{tel}" styleName="lab" width="100%"/>
+		</s:HGroup>
+		<s:HGroup width="100%">
+			<s:Label text="备注" styleName="head" width="100%"/>
+			<s:Label text="{remark}" styleName="lab" width="100%"/>
+		</s:HGroup>
+	</s:VGroup>
+</s:Group>

+ 30 - 0
gkaq/gis-flex/trunk/src/com/view/YjwzGrid.mxml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:VGroup xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		  xmlns:s="library://ns.adobe.com/flex/spark" 
+		  xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" minWidth="500" maxHeight="300">
+	<fx:Declarations>
+		<!-- 将非可视元素(例如服务、值对象)放在此处 -->
+	</fx:Declarations>
+	<fx:Script>
+		<![CDATA[
+			import mx.collections.ArrayCollection;
+			[Bindable]
+			public var  list:ArrayCollection=new ArrayCollection;
+			[Bindable]
+			public var mc:String="";
+		]]>
+	</fx:Script>
+	<s:Label text="{mc}" width="100%" fontFamily="微软雅黑" fontWeight="bold" fontSize="16"/>
+	<s:DataGrid width="100%" height="100%" dataProvider="{list}">
+		<s:columns>
+			<s:ArrayList>
+				<s:GridColumn dataField="WZFL" headerText="序号" showDataTips="true" dataTipField="WZFL" width="100" />
+				<s:GridColumn dataField="CPMC" headerText="产品名称" showDataTips="true" dataTipField="CPMC" width="100"/>
+				<s:GridColumn dataField="GGXH" headerText="规格型号" showDataTips="true" dataTipField="GGXH" width="100"/>
+				<s:GridColumn dataField="SL" headerText="数量" showDataTips="true" dataTipField="SL" width="50"/>
+				<s:GridColumn dataField="SLDW" headerText="单位" showDataTips="true" dataTipField="SLDW" width="50"/>
+				<s:GridColumn dataField="BZ" headerText="备注" showDataTips="true" dataTipField="BZ" width="100"/>
+			</s:ArrayList>
+		</s:columns>
+	</s:DataGrid>
+</s:VGroup>

+ 57 - 0
gkaq/gis-flex/trunk/src/com/view/YjwzWindow.mxml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
+			   xmlns:s="library://ns.adobe.com/flex/spark"
+			   xmlns:mx="library://ns.adobe.com/flex/mx"
+			   width="800" close="windowCloseHandler(event)" windowMove="windowMoveFunction(event)"
+			   title="应急物资库"  skinClass="com.view.yjcz.CxTitleWindow">
+	<s:layout>
+		<s:VerticalLayout/>
+	</s:layout>
+	<fx:Script>
+		<![CDATA[
+			import mx.collections.ArrayCollection;
+			import mx.events.CloseEvent;
+			import mx.events.FlexEvent;
+			import mx.managers.PopUpManager;
+			import mx.resources.IResourceManager;
+			import mx.resources.ResourceManager;
+			import mx.rpc.events.ResultEvent;
+			import mx.collections.ArrayCollection;
+			[Bindable]
+			public var  list:ArrayCollection=new ArrayCollection;
+
+			protected function windowCloseHandler(event:CloseEvent):void
+			{
+				PopUpManager.removePopUp(this);
+			}
+			
+			private function windowMoveFunction(event:Event):void
+			{
+				event.target.x = event.target.x < 0 ? 0 : event.target.x;
+				event.target.x = event.target.x + event.target.width > event.target.parent.width ? event.target.parent.width - event.target.width : event.target.x;
+				event.target.y = event.target.y < 0 ? 0 : event.target.y;
+				event.target.y = event.target.y + event.target.height > event.target.parent.height ? event.target.parent.height - event.target.height : event.target.y;
+			}
+			protected var rm:IResourceManager = ResourceManager.getInstance();
+			private function ssflFunction(item:Object, column:GridColumn):String
+			{
+				return rm.getString("select",item.SSFL);
+			}	
+		]]>
+	</fx:Script>
+	<fx:Declarations>
+		<!-- Place non-visual elements (e.g., services, value objects) here -->
+	</fx:Declarations>
+	<s:DataGrid width="100%" dataProvider="{list}" >
+		<s:columns>
+			<s:ArrayList>
+				<s:GridColumn dataField="SSMC" headerText="设施名称"   width="120" />
+				<s:GridColumn dataField="SL" headerText="数量"   width="50"/>
+				<s:GridColumn dataField="GGXH" headerText="规格型号"  width="120"/>
+				<s:GridColumn dataField="SLDW" headerText="单位"  width="50"/>
+				<s:GridColumn dataField="LXR" headerText="联系人"  width="100"/>
+				<s:GridColumn dataField="LXDH" headerText="联系电话"  width="100"/>
+			</s:ArrayList>
+		</s:columns>
+	</s:DataGrid>
+</s:TitleWindow>

+ 115 - 0
gkaq/gis-flex/trunk/src/com/view/YjyaViewWindow.mxml

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
+			   xmlns:s="library://ns.adobe.com/flex/spark"
+			   xmlns:mx="library://ns.adobe.com/flex/mx"
+			   width="800" height="300" close="windowCloseHandler(event)"
+			   creationComplete="creationCompleteHandler(event)" title="应急预案信息"  xmlns:view="com.view.*" skinClass="com.view.yjcz.CxTitleWindow">
+	<s:layout>
+		<s:VerticalLayout/>
+	</s:layout>
+	<fx:Script>
+		<![CDATA[
+			import mx.collections.ArrayCollection;
+			import mx.core.FlexGlobals;
+			import mx.events.CloseEvent;
+			import mx.events.FlexEvent;
+			import mx.managers.PopUpManager;
+			import mx.resources.IResourceManager;
+			import mx.resources.ResourceManager;
+			import mx.rpc.events.ResultEvent;
+			import com.utils.CommonUtility;
+			
+			import spark.components.gridClasses.GridColumn;
+			
+			protected var rm:IResourceManager = ResourceManager.getInstance();
+			public var jyrID:String;
+			[Bindable]
+			public var jyrMC:String;
+			[Bindable]
+			public var  records:ArrayCollection=new ArrayCollection;
+			protected function resultHandler(event:ResultEvent):void
+			{
+				var ret:ArrayCollection=event.result as ArrayCollection;
+				this.records = ret;
+			}
+			protected function creationCompleteHandler(event:FlexEvent):void
+			{
+				CommonUtility.callRemote("gisController","showYjya",resultHandler,jyrID);
+			}
+			protected function windowCloseHandler(event:CloseEvent):void
+			{
+				PopUpManager.removePopUp(this);
+			}
+			private function sfFunction(item:Object, column:GridColumn):String
+			{
+				if("Y"==item[column.dataField])
+				{
+					return rm.getString("select","Yes");
+				}
+				return rm.getString("select","No");
+			}
+			/**
+			 * 下载
+			 */ 
+			private function downLoadFunction(record:Object):void
+			{
+				if(!record.FJID)
+				{
+					return;
+				}
+				var mainUrl:String = FlexGlobals.topLevelApplication.url;
+				var url:String = mainUrl.substring(0,mainUrl.length-8)+"download.do?accessoryId="+record.FJID;
+				var request:URLRequest = new URLRequest(url);
+				navigateToURL(request,"_self");
+			}
+			/**
+			 * 是否有附件
+			 */
+			public function showFile(record:Object):Boolean
+			{
+				if(record!=null&&record.FJID!=null)
+				{
+					return true;
+				}
+				return false;
+			}
+			/**
+			 * 附件名称
+			 */
+			public function showFileName(record:Object):String
+			{
+				if(record!=null)
+				{
+					return record.FJMC;
+				}
+				return "";
+			}
+		]]>
+	</fx:Script>
+	<fx:Declarations>
+		<!-- Place non-visual elements (e.g., services, value objects) here -->
+	</fx:Declarations>
+	<s:HGroup width="100%" height="40" minHeight="40" gap="0" horizontalAlign="left"
+			  verticalAlign="middle">
+		<s:Spacer width="2" height="0"/>
+		<s:Label width="100" styleName="head" text="港口经营人名称:" textAlign="right"  />
+		<s:TextInput width="300"  id="query_name" enabled="false" text="{jyrMC}"/>
+	</s:HGroup>
+	<s:DataGrid width="100%" height="100%" dataProvider="{records}">
+		<s:columns>
+			<s:ArrayList>
+				<view:DataGridColumn width="100" dataField="YAMC" headerText="预案名称"/>
+				<view:DataGridColumn width="100" dataField="ZDSJ"  dateFormatString="YYYY-MM-DD" headerText="发布时间"/>
+				<view:DataGridColumn width="100" dataField="SFXD" headerText="是否根据实际情况进行预案修订" labelFunction="sfFunction"/>
+				<view:DataGridColumn width="100" dataField="XDSJ"  dateFormatString="YYYY-MM-DD" headerText="修订时间"/>
+				<view:DataGridColumn width="100" dataField="SFBA" headerText="是否已在上级主管部门备案" labelFunction="sfFunction"/>
+				<view:DataGridColumn width="100" dataField="SFPX" headerText="是否组织从业人员进行预案培训" labelFunction="sfFunction"/>
+				<view:DataGridColumn width="100" dataField="SFPXJL" headerText="是否有相关培训计划及记录" labelFunction="sfFunction"/>
+				<view:DataGridColumn width="100" dataField="SFYL" headerText="是否对预案进行演练" labelFunction="sfFunction"/>
+				<view:DataGridColumn width="100" dataField="SFYLJL" headerText="是否有演练计划及记录" labelFunction="sfFunction"/>
+				<view:DataGridColumn width="100" headerText="预案下载" type="{TypeBase.LINKBUTTON}" linkButtonFunc="{downLoadFunction}"
+									 linkEnableFunc="{showFile}" linklabelFunc="{showFileName}"/>
+			</s:ArrayList>
+		</s:columns>
+	</s:DataGrid>
+</s:TitleWindow>

+ 387 - 0
gkaq/gis-flex/trunk/src/com/view/detail/MapTools.mxml

@@ -0,0 +1,387 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009" 
+				   xmlns:s="library://ns.adobe.com/flex/spark" 
+				   xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:tree="com.tree.*"
+				   width="400" height="300" cornerRadius="5"   borderColor="black" borderAlpha=".5" backgroundColor="#4fafe4" 
+				   borderWeight="1" creationComplete="creationCompleteHandler(event)" xmlns:ui="com.view.ui.*" >
+	<s:layout>
+		<s:VerticalLayout gap="0"/>
+	</s:layout>
+	<fx:Declarations>
+		<!-- Place non-visual elements (e.g., services, value objects) here -->
+	</fx:Declarations>
+	<fx:Script>
+		<![CDATA[
+			import com.common.ConstUtil;
+			import com.utils.CommonUtility;
+			import com.events.MenusEvent;
+			import com.supermap.framework.events.BaseEventDispatcher;
+			import com.supermap.web.core.Feature;
+			import com.view.YjwzWindow;
+			import com.view.yjcz.YjczWindow;
+			
+			import mx.collections.ArrayCollection;
+			import mx.collections.XMLListCollection;
+			import mx.controls.Alert;
+			import mx.core.FlexGlobals;
+			import mx.events.FlexEvent;
+			import mx.managers.PopUpManager;
+			import mx.rpc.events.ResultEvent;
+			[Bindable]
+			public var menuXML:XML = null;
+			[Bindable]
+			public var treeClickFun:Function; 
+			[Bindable]
+			private var queryData:ArrayCollection = new ArrayCollection();
+			public var currId:String;
+			private var currSZD:String = null;
+			private var showWz:Boolean=false;
+			private var yjczWindow:YjczWindow = new YjczWindow;
+			protected static var dataXML:XML=
+				<SjlxSelect>
+					<item id="0" localeName=""/>
+					<item id="1" localeName="sjlx.yryb" />    
+					<item id="2" localeName="sjlx.ydyh" />    
+					<item id="3" localeName="sjlx.ztdhz"  />   
+					<item id="4" localeName="sjlx.ztdbz" />   
+					<item id="5" localeName="sjlx.ztdypxl" /> 
+					<item id="6" localeName="sjlx.ztdzrzh" /> 
+				</SjlxSelect>
+				;
+			[Bindable]
+			protected var sglxArr:ArrayCollection=new ArrayCollection([{id:"0",localeName:"sjlx.yz"}]);
+			private var yjwzWin:YjwzWindow  = new YjwzWindow;
+			protected function hiddenLable_clickHandler(event:MouseEvent):void
+			{
+				BaseEventDispatcher.getInstance().dispatchEvent(new MenusEvent(MenusEvent.MENUHIDE,"hide"));
+			}
+			
+			protected function radiusKeyDown(event:KeyboardEvent):void  
+			{  
+				if(event.keyCode == 13)//Enter键  
+				{  
+					searchFun();
+				}  
+			}  
+			protected function radiusYjwlKeyDown(event:KeyboardEvent):void  
+			{  
+				if(event.keyCode == 13)//Enter键  
+				{  
+					searchYjwlFun();
+				}  
+			}  
+			//监听键盘点击事件,Enter键,ESC键  
+			protected function txtKeyDown(event:KeyboardEvent):void  
+			{  
+				if(event.keyCode == 13)//Enter键  
+				{  
+					queryClickHandler(null);
+				}  
+			}  
+			protected function queryClickHandler(event:MouseEvent):void
+			{
+				this.queryData.removeAll();
+				this.queryData.refresh();
+				var name:String = this.mccx.text;
+				CommonUtility.callRemote("gisController","queryCompByName",resultHandler,name);
+			}
+			protected function resultHandler(event:ResultEvent):void
+			{
+				currId ="";
+				currSZD="0";
+				var qy:Object= null;
+				if("queryCompByName"==event.token.message["operation"]){
+					var list:ArrayCollection=event.result as ArrayCollection;
+					this.queryData=list;
+					// 仅有一条记录时直接定位
+					if(list.length==1)
+					{
+						var id:String = list[0].ID as String;
+						currId = id;
+						currSZD = list[0].SZD as String;
+						var nm:String = list[0].NAME as String;
+						 FlexGlobals.topLevelApplication.locateJyr(id,nm);
+					}
+				}
+			}
+			/**
+			 * 经营人查询结果一览双击定位处理
+			 */
+			protected function resultGrid_doubleClickHandler(event:MouseEvent):void
+			{
+				if(resultGrid.selectedItems == null || resultGrid.selectedItems.length == 0)
+				{
+					return;
+				}
+				else if(resultGrid.selectedItems.length > 1)
+				{
+					return;
+				}
+				var id:String = resultGrid.selectedItems[0].ID as String;
+				currId = id;
+				currSZD = resultGrid.selectedItems[0].SZD as String;
+				var nm:String = resultGrid.selectedItems[0].NAME as String;
+				FlexGlobals.topLevelApplication.locateJyr(id,nm);
+			}
+			protected function fieldTypeLabel(item:Object):String
+			{
+				if(null != item){
+					return resourceManager.getString('select',item.@localeName);
+				}
+				return "";
+			}
+			
+			protected function creationCompleteHandler(event:FlexEvent):void
+			{
+				BaseEventDispatcher.getInstance().addEventListener(QueryLayerEvent.QUERY_SUCCESS, queryLayerSuccess);
+			}
+			
+			protected function sglx_creationCompleteHandler(event:FlexEvent):void
+			{
+				sglx.dataProvider= new XMLListCollection(dataXML..item);
+				sglx.textInput.editable = false;
+				sglx.textInput.setStyle("borderColor","#d2d2d2");
+			}
+			public function searchFun():void
+			{
+				if(!currId)
+				{
+					return;
+				}
+				var layerArr:ArrayCollection = new ArrayCollection;
+				layerArr.addItem(ConstUtil.L_ID_AQ_YJWZK);
+				FlexGlobals.topLevelApplication.bufferQuery(ConstUtil.L_ID_AQ_WXHWQY,currId,layerArr,new Number(radius.text));
+				showWz = true;
+			}
+			public function searchYjwlFun():void
+			{
+				if(!currId)
+				{
+					return;
+				}
+				var layerArr:ArrayCollection = new ArrayCollection;
+				layerArr.addItem(ConstUtil.L_ID_AQ_YJWZK);
+				layerArr.addItem(ConstUtil.L_ID_AQ_XF);
+				layerArr.addItem(ConstUtil.L_ID_AQ_JJ);
+				layerArr.addItem(ConstUtil.L_ID_AQ_GA);
+				layerArr.addItem(ConstUtil.L_ID_AQ_YY);
+				layerArr.addItem(ConstUtil.L_ID_AQ_HB);
+				layerArr.addItem(ConstUtil.L_ID_AQ_BF);
+				layerArr.addItem(ConstUtil.L_ID_AQ_SJZX);
+				FlexGlobals.topLevelApplication.bufferQuery(ConstUtil.L_ID_AQ_WXHWQY,currId,layerArr,new Number(radiusYjwl.text));
+			}
+			private function queryLayerSuccess(event:QueryLayerEvent):void
+			{
+				if(!showWz)
+				{
+					return;
+				}
+				showWz=false;
+				var obj:Object = event.data;
+				var features:Array = obj.features;
+				var layerId:String = obj.layerId;
+				if("L_ID_AQ_YJWZK" !=layerId)
+				{
+					return;
+				}
+				var ids:String = "";
+				for each(var fea:Feature in features)
+				{
+					ids +=","+fea.attributes.ID;
+				}
+				if(ids.length>0)
+				{
+					ids = ids.substr(1);
+				}
+				CommonUtility.callRemote("gisController","queryWz",Yjpt_resultHandler,ids,null);
+			}
+			protected function Yjpt_resultHandler(event:ResultEvent):void
+			{
+				var yjwz:ArrayCollection=event.result as ArrayCollection;
+				yjwzWin.list=yjwz;
+				PopUpManager.addPopUp(yjwzWin,FlexGlobals.topLevelApplication as DisplayObject,true);
+				PopUpManager.centerPopUp(yjwzWin);
+			}
+			/**  应急专家 */
+			public function expert_clickHandler(event:MouseEvent = null,type:String = null):void
+			{
+				FlexGlobals.topLevelApplication.showExpert(null,currSZD);
+			}
+			/**  应急处置 */
+			public function yjcz_clickHandler(event:MouseEvent = null,type:String = null):void
+			{
+				if(null != sglx)
+				{
+					yjczWindow.selectedSjlx = sglx.selectedIndex;
+				}
+				if(null != this.currSZD)
+				{
+					yjczWindow.selectSzd =new Number(this.currSZD);
+				}
+				yjczWindow.yappFun(null);
+				PopUpManager.addPopUp(yjczWindow,FlexGlobals.topLevelApplication as DisplayObject,true);
+				PopUpManager.centerPopUp(yjczWindow);
+			}
+			
+			protected function saveHandler(event:MouseEvent):void
+			{
+				var param:Object={
+					sgsj:sgsj.dateTime,
+					sgdd:sgdd.text,
+					sgwz:sgwz.text,
+					sgxz:sgxz.text,
+					sgqy:sgqy.text,
+					sggm:sggm.text,
+					rysw:rysw.text,
+					xcjy:xcjy.text,
+					bjr:bjr.text,
+					bjrlxfs:bjrlxfs.text
+				};
+				CommonUtility.callRemote("gisController","saveJjxx",Yjpt_resultHandler,param);
+			}
+			protected function saveJjxx_resultHandler(event:ResultEvent):void
+			{
+				sgsj.dateTime = new Date;
+				sgdd.text ="";
+				sgwz.text ="";
+				sgxz.text ="";
+				sgqy.text ="";
+				sggm.text ="";
+				rysw.text ="";
+				xcjy.text ="";
+				bjr.text ="";
+				bjrlxfs.text ="";
+				Alert.show("保存成功!","提示");
+			}
+		]]>
+	</fx:Script>
+	<mx:HBox width="100%" height="30" horizontalGap="0" backgroundColor="#136287" verticalAlign="middle">
+		<s:Label text=" 应急处置" fontSize="18" fontWeight="bold" fontFamily="宋体" color="white" height="100%" width="55%" textAlign="left" verticalAlign="middle"/>
+		<s:Spacer width="100%"/>
+		<s:Label text="&gt;&gt;"  click="hiddenLable_clickHandler(event)"  toolTip="隐藏" useHandCursor="true" buttonMode="true" color="white" fontWeight="normal"/>
+		<s:Spacer width="10"/>
+	</mx:HBox>
+	<mx:Accordion id="accordion"  height="100%" width="100%" accentColor="0" selectedIndex="1" borderVisible="false" headerHeight="32"  historyManagementEnabled="false" headerStyleName="AccordionHeader">
+		<mx:headerRenderer>
+			<fx:Component>
+				<mx:Button
+					upSkin="@Embed('images/menu.jpg')" 
+					overSkin="@Embed('images/menu.jpg')"
+					downSkin="@Embed('images/menu.jpg')" 
+					disabledSkin="@Embed('images/menu.jpg')"
+					fontSize="14" textRollOverColor="#ff0000" textSelectedColor="#ffffff" textAlign="left" fontWeight="bold" />
+			</fx:Component>
+		</mx:headerRenderer>
+		<mx:VBox width="100%" height="100%" borderAlpha="1" borderVisible="true"  cornerRadius="5" verticalGap="0" label="接警信息" verticalScrollPolicy="auto" >
+			<s:Scroller width="100%" height="100%">
+				<s:VGroup width="100%" height="100%">
+				<mx:HBox width="100%" height="30" verticalAlign="middle" horizontalGap="0">
+					<s:Label width="35%" height="100%" text="事故时间" fontSize="13" textAlign="center" verticalAlign="middle"/>
+					<ui:DateTime id="sgsj" width="160" dateTime="{new Date}" enabled="true" hasTime="true"/>
+				</mx:HBox>
+				<mx:HRule width="100%" height="1"/>
+				<mx:HBox width="100%" height="30" verticalAlign="middle" horizontalGap="0">
+					<s:Label  width="35%" height="100%" text="事故地点" fontSize="13" textAlign="center" verticalAlign="middle"/>
+					<ui:QTextInput id="sgdd" width="160"/>
+				</mx:HBox>
+				<mx:HRule width="100%" height="1"/>
+				<mx:HBox width="100%" height="30" verticalAlign="middle" horizontalGap="0">
+					<s:Label width="35%" height="100%" text="事故位置" fontSize="13" textAlign="center" verticalAlign="middle"/>
+					<ui:QTextInput  id="sgwz" width="160"/>
+				</mx:HBox>
+				<mx:HRule width="100%" height="1"/>
+				<mx:HBox width="100%" height="30" verticalAlign="middle" horizontalGap="0">
+					<s:Label width="35%" height="100%" text="事故类型和性质" fontSize="13" textAlign="center" verticalAlign="middle"/>
+					<ui:QTextInput id="sgxz" width="160"/>
+				</mx:HBox>
+				<mx:HRule width="100%" height="1"/>
+				<mx:HBox width="100%" height="30" verticalAlign="middle" horizontalGap="0">
+					<s:Label width="35%" height="100%" text="事故起因&#13;及简要经过" fontSize="13" textAlign="center" verticalAlign="middle"/>
+					<ui:QTextInput id="sgqy" width="160"/>
+				</mx:HBox>
+				<mx:HRule width="100%" height="1"/>
+				<mx:HBox width="100%" height="30" verticalAlign="middle" horizontalGap="0">
+					<s:Label width="35%" height="100%" text="事故规模&#13;及扩展趋势" fontSize="13" textAlign="center" verticalAlign="middle"/>
+					<ui:QTextInput id="sggm" width="160"/>
+				</mx:HBox>
+				<mx:HRule width="100%" height="1"/>
+				<mx:HBox width="100%" height="30" verticalAlign="middle" horizontalGap="0">
+					<s:Label width="35%" height="100%" text="人员伤亡及设施损坏初步情况" fontSize="13" textAlign="center" verticalAlign="middle"/>
+					<ui:QTextInput id="rysw" width="160"/>
+				</mx:HBox>
+				<mx:HRule width="100%" height="1"/>
+				<mx:HBox width="100%" height="30" verticalAlign="middle" horizontalGap="0">
+					<s:Label width="35%" height="100%" text="现场救援情况" fontSize="13" textAlign="center" verticalAlign="middle"/>
+					<ui:QTextInput id="xcjy" width="160"/>
+				</mx:HBox>
+				<mx:HRule width="100%" height="1"/>
+				<mx:HBox width="100%" height="30" verticalAlign="middle" horizontalGap="0">
+					<s:Label width="35%" height="100%" text="报警人" fontSize="13" textAlign="center" verticalAlign="middle"/>
+					<ui:QTextInput id="bjr" width="160"/>
+				</mx:HBox>
+				<mx:HRule width="100%" height="1"/>
+				<mx:HBox width="100%" height="30" verticalAlign="middle" horizontalGap="0">
+					<s:Label width="35%" height="100%" text="报警人联系方式" fontSize="13" textAlign="center" verticalAlign="middle"/>
+					<ui:QTextInput id="bjrlxfs" width="160"/>
+				</mx:HBox>
+				<mx:HBox width="100%" height="30" verticalAlign="middle" horizontalGap="0" horizontalAlign="center">
+					<s:Button label="保存" click="saveHandler(event)" skinClass="com.skins.ButtonSkin" width="60" fontSize="14"  />
+				</mx:HBox>
+				</s:VGroup>
+			</s:Scroller>
+		</mx:VBox>
+		<mx:VBox width="100%" height="100%" borderAlpha="1" borderVisible="true"  cornerRadius="5" verticalGap="1" label="事故定位">
+			<mx:HBox width="100%" height="30" verticalAlign="middle" horizontalGap="0">
+				<s:Label width="30%" height="100%" text="事件类型" fontSize="13" textAlign="center" verticalAlign="middle"/>
+				<s:ComboBox width="70%" height="28" id="sglx" creationComplete="sglx_creationCompleteHandler(event)"   labelFunction="fieldTypeLabel" styleName="combo"  requireSelection="true" />
+			</mx:HBox>
+			<mx:HRule width="100%" height="1"/>
+			<mx:HBox width="100%" height="30" verticalAlign="middle" horizontalGap="0">
+				<s:Label width="30%" height="100%" text="企业名称" fontSize="13" textAlign="center" verticalAlign="middle"/>
+				<mx:HBox width="70%" height="100%">
+					<s:TextInput id="mccx" width="85%" height="24" keyDown="txtKeyDown(event)"/>
+					<s:Spacer width="5" height="0" />
+					<s:Image source="images/png/aq_searchMini.png" buttonMode="true" click="queryClickHandler(event)" />
+				</mx:HBox>
+			</mx:HBox>
+			<s:SkinnableContainer width="100%" height="100%" skinClass="com.skins.SkinnableContainerSkin">
+				<s:layout>
+					<s:HorizontalLayout/>
+				</s:layout>
+				<mx:DataGrid id="resultGrid" width="100%" height="100%" dataProvider="{queryData}" doubleClickEnabled="true" doubleClick="resultGrid_doubleClickHandler(event)">
+					<mx:columns>
+						<mx:DataGridColumn dataField="ID" headerText="ID" visible="false" width="100" headerWordWrap="true"/>
+						<mx:DataGridColumn dataField="SZD" headerText="SZD" visible="false" width="100" headerWordWrap="true"/>
+						<mx:DataGridColumn dataField="NAME" headerText="名称" width="100" showDataTips="true" headerWordWrap="true"/>
+					</mx:columns>
+				</mx:DataGrid>
+			</s:SkinnableContainer>
+		</mx:VBox>
+		<mx:HBox width="100%" height="100%" borderAlpha="1" borderVisible="true"  cornerRadius="5" verticalGap="1" label="应急物资">
+			<mx:HBox width="100%" height="30" verticalAlign="middle" horizontalGap="0" horizontalAlign="center">
+				<s:Label  text="搜索半径" fontSize="14" textAlign="center" verticalAlign="middle"/>
+				<s:TextInput id="radius" text="5" maxChars="3" width="40" keyDown="radiusKeyDown(event)"/>
+				<s:Label text="公里"  fontSize="14"/>
+				<s:Button label="确定" click="{searchFun()}" skinClass="com.skins.ButtonSkin" width="60" fontSize="14" />
+			</mx:HBox>
+		</mx:HBox>
+		<mx:VBox width="100%" height="100%" borderAlpha="1" borderVisible="true"  cornerRadius="5" verticalGap="1" label="其他应急机构">
+			<mx:HBox width="100%" height="30" verticalAlign="middle" horizontalGap="0" horizontalAlign="center">
+				<s:Label  text="搜索半径" fontSize="14" textAlign="center" verticalAlign="middle"/>
+				<s:TextInput id="radiusYjwl" text="5" maxChars="3" width="40" keyDown="radiusYjwlKeyDown(event)"/>
+				<s:Label text="公里"  fontSize="14"/>
+				<s:Button label="确定" click="{searchYjwlFun()}" skinClass="com.skins.ButtonSkin" width="60" fontSize="14" />
+			</mx:HBox>
+		</mx:VBox>
+		<mx:VBox width="100%" height="100%" borderAlpha="1" borderVisible="true"  cornerRadius="5" verticalGap="1" label="应急专家">
+			<mx:HBox width="100%" height="30" verticalAlign="middle" horizontalGap="0" horizontalAlign="center">
+				<s:Button label="全省应急专家库" click="expert_clickHandler(event)" skinClass="com.skins.ButtonSkin" width="130" />
+			</mx:HBox>
+		</mx:VBox>
+		<mx:VBox width="100%" height="100%" borderAlpha="1" borderVisible="true"  cornerRadius="5" verticalGap="1" label="应急流程">
+			<mx:HBox width="100%" height="30" verticalAlign="middle" horizontalGap="0" horizontalAlign="center">
+				<s:Button label="查看应急处置" click="yjcz_clickHandler(event)" skinClass="com.skins.ButtonSkin" width="130" />
+			</mx:HBox>
+		</mx:VBox>
+	</mx:Accordion>
+</s:BorderContainer>

+ 135 - 0
gkaq/gis-flex/trunk/src/com/view/detail/PointDetail.mxml

@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
+				   xmlns:s="library://ns.adobe.com/flex/spark"
+				   xmlns:mx="library://ns.adobe.com/flex/mx"
+				   width="200" height="100"  borderColor="0xFF1A96C8" fontFamily="华文新魏" borderWeight="3" visible="{show}">
+	<s:layout>
+		<s:VerticalLayout/>
+	</s:layout>
+	<fx:Declarations>
+		<!-- 将非可视元素(例如服务、值对象)放在此处 -->
+	</fx:Declarations>
+	<fx:Style>
+		@namespace s "library://ns.adobe.com/flex/spark";
+		@namespace mx "library://ns.adobe.com/flex/mx";
+		.lab{
+			fontWeight:normal;
+			fontFamily:微软雅黑;
+		}
+		.head{
+			fontWeight:bold;
+			fontFamily:微软雅黑;
+			textAlign:left;
+		}
+	</fx:Style>
+	
+	<fx:Script>
+		<![CDATA[
+			import com.common.ConstUtil;
+			import com.view.ExpertWindow;
+			import com.view.YjwzGrid;
+			import com.view.YjwzWindow;
+			import com.view.YjyaViewWindow;
+			
+			import mx.collections.ArrayCollection;
+			import mx.containers.TitleWindow;
+			import mx.controls.Text;
+			import mx.core.FlexGlobals;
+			import mx.events.CloseEvent;
+			import mx.managers.PopUpManager;
+			import mx.resources.IResourceManager;
+			import mx.resources.ResourceManager;
+			import mx.rpc.events.ResultEvent;
+			import com.utils.CommonUtility;
+			
+			private var yjwzWin:YjwzWindow  = new YjwzWindow;
+			[Bindable]
+			// 经营人ID
+			public var recordId:String;
+			[Bindable]
+			// 港口经营人名称
+			public var gkjyr:String;
+			[Bindable]
+			public var show:Boolean=false;
+			
+			protected var rm:IResourceManager = ResourceManager.getInstance();
+			
+			public function showYjwz():void
+			{
+				CommonUtility.callRemote("gisController","yjwz_jyr",Yjpt_resultHandler,recordId);
+			}
+			protected function Yjpt_resultHandler(event:ResultEvent):void
+			{
+				var yjwz:ArrayCollection=event.result as ArrayCollection;
+				var name:String="";
+				var xh:Number=0;
+				var tjList:ArrayCollection=new ArrayCollection;
+				for each(var o:Object in yjwz){
+					o["WZFL"]=rm.getString("select",o["WZFL"]);
+					if(name!=o["WZFL"]){
+						var item:Object=new Object;
+						item["WZFL"]=o["WZFL"];
+						item["index"]=yjwz.getItemIndex(o);
+						tjList.addItemAt(item,0);
+						name=o["WZFL"];
+						xh=0;
+					}
+					o["WZFL"]=++xh;
+				}
+				for each(var obj:Object in tjList){
+					yjwz.addItemAt(obj,obj.index);
+				}
+				yjwzWin.list=yjwz;
+				if(yjwz.length>0){
+					yjwzWin.mc=yjwz.getItemAt(0)["MC"];
+				}else{
+					yjwzWin.mc="";
+				}
+				PopUpManager.addPopUp(yjwzWin,FlexGlobals.topLevelApplication as DisplayObject,true);
+				PopUpManager.centerPopUp(yjwzWin);
+			}
+			public function searchFun():void
+			{
+				var layerArr:ArrayCollection = new ArrayCollection;
+				layerArr.addItem(ConstUtil.L_ID_AQ_YJWZK);
+				layerArr.addItem(ConstUtil.L_ID_AQ_XF);
+				layerArr.addItem(ConstUtil.L_ID_AQ_JJ);
+				layerArr.addItem(ConstUtil.L_ID_AQ_GA);
+				layerArr.addItem(ConstUtil.L_ID_AQ_YY);
+				FlexGlobals.topLevelApplication.bufferQuery(ConstUtil.L_ID_AQ_ZDWXYQY,recordId,layerArr,new Number(radius.text));
+			}
+			public function showExpert():void
+			{
+				var expertWin:ExpertWindow =new ExpertWindow();
+				expertWin.dwmc = this.gkjyr;
+				PopUpManager.addPopUp(expertWin,FlexGlobals.topLevelApplication as DisplayObject,true);
+				PopUpManager.centerPopUp(expertWin);
+			}
+			public function showYjya():void
+			{
+				var yjyaView:YjyaViewWindow = new YjyaViewWindow;
+				yjyaView.jyrMC=gkjyr;
+				yjyaView.jyrID = recordId;
+				PopUpManager.addPopUp(yjyaView,FlexGlobals.topLevelApplication as DisplayObject,true);
+				PopUpManager.centerPopUp(yjyaView);
+			}
+		]]>
+	</fx:Script>
+	<s:VGroup width="100%" height="100%" paddingLeft="5" paddingRight="5" paddingTop="5" paddingBottom="5">
+		<s:Label text="{gkjyr}" width="100%" fontFamily="微软雅黑" fontWeight="bold" fontSize="16"/>
+		<s:HGroup width="100%" verticalAlign="middle">
+			<s:Label text="应急网络:" styleName="head"/>
+			<s:TextInput id="radius" text="5" maxChars="3" width="40"/>
+			<s:Label text="公里" styleName="head" />
+			<s:Image source="images/png/location.png" buttonMode="true" click="{searchFun()}"/>
+		</s:HGroup>
+		<s:HGroup width="100%" verticalAlign="middle">
+			<s:Spacer width="5" height="0"/>
+			<s:Image source="images/png/aq_yywzkMini.png" buttonMode="true" click="{showYjwz()}" toolTip="应急物资库"/>
+			<s:Spacer width="5" height="0"/>
+			<s:Image source="images/png/aq_expertMini.png" buttonMode="true" click="{showExpert()}" toolTip="应急专家库"/>
+			<s:Spacer width="5" height="0"/>
+			<s:Image source="images/png/aq_yjya.png" buttonMode="true" click="{showYjya()}" toolTip="应急预案"/>
+		</s:HGroup>
+	</s:VGroup>
+</s:BorderContainer>

+ 20 - 0
gkaq/gis-flex/trunk/src/com/view/tjcx/ResourceNode.as

@@ -0,0 +1,20 @@
+package com.view.tjcx
+{
+	import mx.collections.ArrayCollection;
+
+	[Bindable]
+	[RemoteClass(alias="com.jtgh.yjpt.controller.gis.ResourceNode")]
+	public class ResourceNode
+	{
+		// 节点唯一标识
+		public var id:Number;
+		// 显示名称
+		public var label:String;
+		// 节点类型(所在地:szd...)
+		public var type:String;
+		public var children:ArrayCollection =  new ArrayCollection();
+		public function ResourceNode()
+		{
+		}
+	}
+}

+ 240 - 0
gkaq/gis-flex/trunk/src/com/view/tjcx/TjcxWindow.mxml

@@ -0,0 +1,240 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
+			   xmlns:s="library://ns.adobe.com/flex/spark"
+			   xmlns:mx="library://ns.adobe.com/flex/mx"
+			   xmlns:view="com.view.*"
+			   xmlns:ui="com.view.ui.*"
+			   width="900" close="windowCloseHandler(event)"
+			   creationComplete="creationCompleteHandler(event)"
+			   skinClass="com.view.yjcz.CxTitleWindow" title="危货作业吞吐量查询统计"
+			   windowMove="windowMoveFunction(event)">
+	<s:layout>
+		<s:VerticalLayout gap="0"/>
+	</s:layout>
+	<fx:Script>
+		<![CDATA[
+			import com.common.ConstUtil;
+			import com.utils.CommonUtility;
+			import com.view.CodeVo;
+			import com.view.DataGridColumn;
+			import com.view.TypeBase;
+			
+			import mx.collections.ArrayCollection;
+			import mx.controls.Alert;
+			import mx.core.FlexGlobals;
+			import mx.events.CloseEvent;
+			import mx.events.FlexEvent;
+			import mx.formatters.DateFormatter;
+			import mx.managers.PopUpManager;
+			import mx.resources.IResourceManager;
+			import mx.resources.ResourceManager;
+			import mx.rpc.events.ResultEvent;
+			
+			import spark.components.gridClasses.GridColumn;
+			protected var rm:IResourceManager = ResourceManager.getInstance();
+			[Bindable]  
+			private var szdArray:ArrayCollection;
+			[Bindable]  
+			private var blankCode:CodeVo;
+			[Bindable]
+			public var  records:ArrayCollection=new ArrayCollection;
+			private var init:Boolean = false;
+			public static  const jdArr:ArrayCollection = new ArrayCollection([{id:"0", label:""},{id:"1", label:"一季度"},{id:"2", label:"二季度"},{id:"3", label:"三季度"},{id:"4", label:"四季度"}]);
+			public static const tjfsArr:ArrayCollection = new ArrayCollection([{id:"1", label:"码头(泊位)"},{id:"2", label:"经营人"},{id:"3", label:"危货品种"}]);
+			// 危货名称统计列格式
+			private var whmcColumns:ArrayCollection;
+			// 经营人统计列格式
+			private var jyrColumns:ArrayCollection;
+			// 码头统计列格式
+			private var mtbwColumns:ArrayCollection;
+			private var currColumn:String = "1";
+			protected function windowCloseHandler(event:CloseEvent):void
+			{
+				PopUpManager.removePopUp(this);
+			}
+			private function initColumns():void
+			{
+				whmcColumns = new ArrayCollection;
+				var ttl:GridColumn =new GridColumn("SL");
+				ttl.headerText = "吞吐量";
+				var zyhz:GridColumn =new GridColumn("ZYHZ");
+				zyhz.headerText = "主要货种";
+				var locattion:DataGridColumn =new DataGridColumn("");
+				locattion.width=50;
+				locattion.type=TypeBase.LINKBUTTON;
+				locattion.linkButtonFunc = location_clickHandler;
+				locattion.linkEnableFunc = showFile;
+				locattion.linklabelFunc = function(record:Object):String{return "定位"};
+					
+				/** 按泊位统计列设置 */
+				var col:GridColumn =new GridColumn("WXHWMCBH");
+				col.headerText = "危货品种名称";
+				// 危货名称
+				whmcColumns.addItem(col);
+				// 吞吐量
+				whmcColumns.addItem(ttl);
+				/** 按经营人排名 */
+				var jjr:GridColumn = new GridColumn("JYRMC");
+				jjr.headerText = "经营人名称";
+				jyrColumns = new ArrayCollection;
+				// 经营人名称
+				jyrColumns.addItem(jjr);
+				// 吞吐量
+				jyrColumns.addItem(ttl);
+				// 主要货种
+				jyrColumns.addItem(zyhz);
+				// 定位
+				jyrColumns.addItem(locattion);
+				
+				/** 按泊位排名 */
+				col = new GridColumn("MTBW");
+				col.headerText = "码头泊位";
+				mtbwColumns = new ArrayCollection;
+				// 码头泊位
+				mtbwColumns.addItem(col);
+				// 经营人
+				mtbwColumns.addItem(jjr);
+				// 吞吐量
+				mtbwColumns.addItem(ttl);
+				// 主要货种
+				mtbwColumns.addItem(zyhz);
+				// 定位
+				mtbwColumns.addItem(locattion);
+			}
+			protected function creationCompleteHandler(event:FlexEvent):void
+			{ 
+
+				initColumns();
+				dataGrid.columns =mtbwColumns;
+				blankCode= new CodeVo();
+				blankCode.id=0;
+				blankCode.code="";
+				blankCode.label="";
+				this.init = true;
+				doSearch();
+			}
+			protected function resultHandler(event:ResultEvent):void
+			{
+				var newColumn:String = tjfs.selectedItem.id as String;
+				if(newColumn != this.currColumn)
+				{
+					this.currColumn = newColumn;
+					if(this.currColumn =="1")
+					{
+						dataGrid.columns =mtbwColumns;
+					}else if(this.currColumn =="2")
+					{
+						dataGrid.columns =jyrColumns;
+					}else if(this.currColumn =="3")
+					{
+						dataGrid.columns =whmcColumns;
+					}else{
+						dataGrid.columns =mtbwColumns;
+					}
+				}
+				var ret:ArrayCollection=event.result as ArrayCollection;
+				this.records = ret;
+			}
+			private function doSearch():void
+			{
+				var param:Object = {
+					szd:query_szd.selectedID,
+						tj:tjfs.selectedItem.id,
+						sbsjq:sbsjq.dateTime,
+					sbsjz:sbsjz.dateTime,
+					kgsjq:kgsjq.dateTime,
+					kgsjz:kgsjz.dateTime,
+					wgsjq:wgsjq.dateTime,
+					wgsjz:wgsjz.dateTime,
+					tjfs:tjfs.selectedItem.id
+				};
+				CommonUtility.callRemote("gisController","doCxtj",resultHandler,param);
+			}
+			private function windowMoveFunction(event:Event):void
+			{
+				event.target.x = event.target.x < 0 ? 0 : event.target.x;
+				event.target.x = event.target.x + event.target.width > event.target.parent.width ? event.target.parent.width - event.target.width : event.target.x;
+				event.target.y = event.target.y < 0 ? 0 : event.target.y;
+				event.target.y = event.target.y + event.target.height > event.target.parent.height ? event.target.parent.height - event.target.height : event.target.y;
+			}
+			protected function search_clickHandler(event:MouseEvent = null):void
+			{
+				doSearch();
+			}
+			/**
+			 * 是否显示
+			 */
+			public function showFile(record:Object):Boolean
+			{
+				return true;
+			}
+			/**
+			 * 查看理化特性
+			 */
+			protected function location_clickHandler(record:Object):void
+			{
+				if(record.JYR){
+					FlexGlobals.topLevelApplication.location(ConstUtil.L_ID_AQ_WXHWQY,"ID="+record.JYR,5000,true);
+				}
+				if(record.SMID){
+					FlexGlobals.topLevelApplication.location(ConstUtil.L_ID_BW_AQ," id="+record.SMID,5000,true);
+				}
+			}
+			protected function db_clickHandler(e:Event):void
+			{
+				if(dataGrid.selectedItems == null || dataGrid.selectedItems.length == 0)
+				{
+					return;
+				}
+				else if(dataGrid.selectedItems.length > 1)
+				{
+					return;
+				}
+				var newColumn:String = tjfs.selectedItem.id as String;
+				if("3"!= newColumn)
+				{
+					location_clickHandler(dataGrid.selectedItems[0]);
+				}
+			}
+		]]>
+	</fx:Script>
+	<fx:Declarations>
+		<!-- Place non-visual elements (e.g., services, value objects) here -->
+	</fx:Declarations>
+	<!-- 定义工具栏按钮 -->
+	<s:HGroup width="100%" minHeight="36" gap="0" horizontalAlign="left" verticalAlign="middle">
+		<s:Label id="query_szdLabel" width="80" styleName="head" text="所在地:" textAlign="right"/>
+		<view:Selector id="query_szd" width="120" blankCode="{blankCode}" code="SZD" hasBlank="true" selectedID="0" textAlign="left"/>
+		<s:Label width="80" text="统计方式:" textAlign="right"/>
+		<s:ComboBox id="tjfs" width="120" dataProvider="{tjfsArr}" labelField="label" selectedIndex="0"/>
+		<s:Label  width="80" styleName="head" text="申报时间起:" textAlign="right"/>
+		<ui:DateTime id="sbsjq" width="120" enabled="true" hasTime="false"/>
+		<s:Label width="80"  styleName="head" text="申报时间止:" textAlign="right"/>
+		<ui:DateTime id="sbsjz" width="120" enabled="true" hasTime="false"/>
+		<s:Spacer width="10" height="0"/>
+		<s:Image buttonMode="true" click="search_clickHandler(event)" source="images/png/huizong.png"/>
+	</s:HGroup>
+	<!-- 申报时间 
+	<s:HGroup width="100%" minHeight="36" gap="0" horizontalAlign="left" verticalAlign="middle">
+	</s:HGroup>
+	-->
+	<!-- 开工时间 -->
+	<s:HGroup width="100%" minHeight="36" gap="0" horizontalAlign="left" verticalAlign="middle">
+		<s:Label width="80" styleName="head" text="开工时间起:" textAlign="right"/>
+		<ui:DateTime id="kgsjq" width="120" enabled="true" hasTime="false"/>
+		<s:Label width="80" styleName="head" text="开工时间止:" textAlign="right"/>
+		<ui:DateTime id="kgsjz" width="120" enabled="true" hasTime="false"/>
+		<s:Label width="80" styleName="head" text="完工时间起:" textAlign="right"/>
+		<ui:DateTime id="wgsjq" width="120" enabled="true" hasTime="false"/>
+		<s:Label width="80" styleName="head" text="完工时间止:" textAlign="right"/>
+		<ui:DateTime id="wgsjz" width="120" enabled="true" hasTime="false"/>
+	</s:HGroup>
+	<!-- 完工时间 
+	<s:HGroup width="100%" minHeight="36" gap="0" horizontalAlign="left" verticalAlign="middle">
+		
+	</s:HGroup>-->
+	
+	<s:DataGrid id="dataGrid" width="100%" dataProvider="{records}"
+				doubleClick="db_clickHandler(event)" doubleClickEnabled="true">
+	</s:DataGrid>
+</s:TitleWindow>

+ 122 - 0
gkaq/gis-flex/trunk/src/com/view/tjcx/ZydwWindow.mxml

@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
+			   xmlns:s="library://ns.adobe.com/flex/spark"
+			   xmlns:mx="library://ns.adobe.com/flex/mx"
+			   xmlns:view="com.view.*"
+			   width="420" close="windowCloseHandler(event)"
+			   creationComplete="creationCompleteHandler(event)"
+			   skinClass="com.view.yjcz.CxTitleWindow" title="资源定位" height="500"
+			   windowMove="windowMoveFunction(event)">
+	<s:layout>
+		<s:VerticalLayout/>
+	</s:layout>
+	<fx:Script>
+		<![CDATA[
+			import com.common.ConstUtil;
+			
+			import mx.core.FlexGlobals;
+			import mx.collections.ArrayCollection;
+			import mx.controls.Tree;
+			import mx.events.CloseEvent;
+			import mx.events.FlexEvent;
+			import mx.managers.PopUpManager;
+			[Bindable]
+			public  var resourceNodes:ArrayCollection =null;
+			[Bindable]
+			[Embed(source="images/video/folderClosed.png")]
+			private var myFolderClosedIcon:Class;
+			[Bindable]
+			[Embed(source="images/video/FolderOpened.png")]
+			private var myFolderOpenedIcon:Class;
+			
+			protected function windowCloseHandler(event:CloseEvent):void
+			{
+				PopUpManager.removePopUp(this);
+			}
+			
+			protected function creationCompleteHandler(event:FlexEvent):void
+			{ 
+				
+			}
+			private function windowMoveFunction(event:Event):void
+			{
+				event.target.x = event.target.x < 0 ? 0 : event.target.x;
+				event.target.x = event.target.x + event.target.width > event.target.parent.width ? event.target.parent.width - event.target.width : event.target.x;
+				event.target.y = event.target.y < 0 ? 0 : event.target.y;
+				event.target.y = event.target.y + event.target.height > event.target.parent.height ? event.target.parent.height - event.target.height : event.target.y;
+			}
+			private function changeTreeNodeState(event:Event):void
+			{
+				var tree:Tree = event.currentTarget as Tree;
+				var item:Object = tree.selectedItem;
+				
+				if(tree.dataDescriptor.isBranch(item)){
+					tree.expandItem(item,!tree.isItemOpen(item),true);
+				}
+				
+			}
+			private function locationHandle(event:Event):void
+			{
+				this.locationAction(event.currentTarget.selectedItem);
+				
+			}
+			
+			public function locationAction(item:Object):void
+			{
+				var type:String = item.type;
+				switch(type)
+				{
+					// 取水口
+					case "qsk":
+						FlexGlobals.topLevelApplication.location(ConstUtil.L_ID_AQ_QSK,"ID="+item.id,5000,true);
+						break;
+					//  物资库
+					case "wzk":
+						FlexGlobals.topLevelApplication.location(ConstUtil.L_ID_AQ_YJWZK,"ID="+item.id,5000,true);
+						break;
+					// 经营人
+					case "jyr":
+						FlexGlobals.topLevelApplication.location(ConstUtil.L_ID_AQ_WXHWQY,"ID="+item.id,5000,true);
+						FlexGlobals.topLevelApplication.toolsCt.currId=item.id;
+						break;
+					// 应急网络
+					case "xf":
+						FlexGlobals.topLevelApplication.location(ConstUtil.L_ID_AQ_XF,"ID="+item.id,5000,true);
+						break;
+					case "yy":
+						FlexGlobals.topLevelApplication.location(ConstUtil.L_ID_AQ_YY,"ID="+item.id,5000,true);
+						break;
+					case "jj":
+						FlexGlobals.topLevelApplication.location(ConstUtil.L_ID_AQ_JJ,"ID="+item.id,5000,true);
+						break;
+					case "ga":
+						FlexGlobals.topLevelApplication.location(ConstUtil.L_ID_AQ_GA,"ID="+item.id,5000,true);
+						break;
+					case "bf":
+						FlexGlobals.topLevelApplication.location(ConstUtil.L_ID_AQ_BF,"ID="+item.id,5000,true);
+						break;
+					case "hb":
+						FlexGlobals.topLevelApplication.location(ConstUtil.L_ID_AQ_HB,"ID="+item.id,5000,true);
+						break;
+					case "sj":
+						FlexGlobals.topLevelApplication.location(ConstUtil.L_ID_AQ_SJZX,"ID="+item.id,5000,true);
+						break;
+				}
+			}
+		]]>
+	</fx:Script>
+	<fx:Declarations>
+		<!-- Place non-visual elements (e.g., services, value objects) here -->
+	</fx:Declarations>
+	<s:BorderContainer id="locationModel" visible="true" width="100%" height="100%"
+					   backgroundColor="#F5FAFE" borderVisible="false" includeInLayout="true">
+		<view:TreeWithLines id="locationTree" width="100%" height="100%" borderVisible="false"
+							click="changeTreeNodeState(event)" contentBackgroundColor="#F5FAFE"
+							dataProvider="{this.resourceNodes}" defaultLeafIcon="{null}"
+							disclosureClosedIcon="{myFolderClosedIcon}"
+							disclosureOpenIcon="{myFolderOpenedIcon}"
+							doubleClick="locationHandle(event);" doubleClickEnabled="true"
+							folderClosedIcon="{null}" folderOpenIcon="{null}" labelField="label"
+							rowHeight="32"/>
+	</s:BorderContainer>
+</s:TitleWindow>

+ 307 - 0
gkaq/gis-flex/trunk/src/com/view/ui/DateTime.mxml

@@ -0,0 +1,307 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		 xmlns:s="library://ns.adobe.com/flex/spark" 
+		 xmlns:mx="library://ns.adobe.com/flex/mx"
+		 creationComplete="creationCompleteHandler(event)"
+		 width="100%" height="23" xmlns:ui="com.view.ui.*" >
+	<fx:Declarations>
+		<mx:DateFormatter id="dateInputFormator" formatString="YYYY-MM-DD JJ:NN" />
+	</fx:Declarations>
+	<s:HGroup id="dt" gap="0" verticalAlign="middle" width="100%" height="100%">
+		<ui:QTextInput id="returnTime" width="100%" editable="{initeditable}" text="{initvalue}"  skinClass="com.skins.DateTimeInputSkin"/>
+		<s:Button width="22" height="22" click="open(event)" icon="@Embed(source='mx/controls/DateChooser.png')"/>
+		<s:Spacer width="5"/>
+		<s:Button width="22" height="22" click="button1_clickHandler(event)" icon="@Embed(source='images/yjpt/list/iconpng.png')" toolTip="清空"/>
+	</s:HGroup>
+	<fx:Script>
+		<![CDATA[
+			import mx.binding.utils.BindingUtils;
+			import mx.containers.HBox;
+			import mx.controls.Button;
+			import mx.controls.Label;
+			import mx.controls.NumericStepper;
+			import mx.controls.Text;
+			import mx.controls.TileList;
+			import mx.core.IFlexDisplayObject;
+			import mx.events.CloseEvent;
+			import mx.events.FlexEvent;
+			import mx.events.ListEvent;
+			import mx.events.NumericStepperEvent;
+			import mx.managers.PopUpManager;
+			
+			[Bindable]
+			private var initvalue: String;
+			[Bindable]
+			private var initeditable:Boolean;
+//			[Bindable]
+//			public var dt_percentWidth:Number;
+			
+			public var resultTime:Text;
+			public var hasTime:Boolean=false;
+			
+			private var m_width:Number = 168;
+			
+			private var pop:Object;
+//			private var isOpen:Boolean = false;
+			private var nowTime:Date;
+			
+			protected function creationCompleteHandler(event:FlexEvent):void
+			{
+//				BindingUtils.bindProperty(this.dt,"percentWidth",this,"dt_percentWidth");
+			}
+			
+//			override public function set width(value:Number):void{
+//				dt.width = value;
+//			}
+		
+//			override public function set percentWidth(value:Number):void{
+//				dt_percentWidth = value;
+//			}
+		
+			private function open(event:MouseEvent):void{
+				resultTime = new Text();
+//				if(!isOpen){
+				if(pop==null||!systemManager.contains(pop as DisplayObject)){
+					if(nowTime==null){
+						nowTime=new Date;
+					}
+					pop = PopUpManager.createPopUp(this, mx.containers.TitleWindow, false);
+					pop.showCloseButton = true;
+					pop.addEventListener(CloseEvent.CLOSE,closeHandler);
+					pop.addEventListener(MouseEvent.ROLL_OUT,closeHandler);
+					pop.move(event.stageX+event.target.width-event.localX-175,event.stageY-event.localY+25);
+					//pop.title = nowTime.fullYear.toString() + " 年 " + (nowTime.month+1) + " 月";
+					pop.title = "时间选择";
+					pop.setStyle("fontSize",12);
+					
+					
+					var yearChangeHandler:Function = function(evt:NumericStepperEvent):void{
+						nowTime.setFullYear(evt.value,nowTime.month,nowTime.date);
+						if(systemManager.contains(pop as DisplayObject)){
+							PopUpManager.removePopUp(pop as IFlexDisplayObject);
+							open(event);
+						}
+//						isOpen = false;
+					}
+					
+					var monthChangeHandler:Function = function(evt:NumericStepperEvent):void{
+						nowTime.setFullYear(nowTime.fullYear,evt.value-1,nowTime.date);
+						if(systemManager.contains(pop as DisplayObject)){
+							PopUpManager.removePopUp(pop as IFlexDisplayObject);
+							open(event);
+						}
+//						isOpen = false;
+					}
+					
+					var minuteChangeHandler:Function = function(evt:NumericStepperEvent):void{
+						nowTime.setHours(nowTime.hours,evt.value,nowTime.seconds,nowTime.milliseconds);
+					}
+					
+					var hourChangeHandler:Function = function(evt:NumericStepperEvent):void{
+						nowTime.setHours(evt.value,nowTime.minutes,nowTime.seconds,nowTime.milliseconds);
+					}
+					
+					var testHandler:Function = function(event:ListEvent):void{
+						nowTime.date = new Number(event.target.selectedItems[0]);
+						resultTime.text = nowTime.fullYear + "-" + (nowTime.month+1) + "-" 
+							+ event.target.selectedItems;
+						if(hasTime)
+							resultTime.text = resultTime.text
+							+ " " +hour.value
+							+ ":" + minute.value + ":" +nowTime.seconds;
+//						returnTime.text =  resultTime.text;
+						returnTime.text = dateInputFormator.format(resultTime.text);
+					}
+					
+					
+					var hBoxTop:HBox = new HBox();
+					hBoxTop.width = m_width;
+					var year:NumericStepper = new NumericStepper();
+					year.setStyle("fontSize",10);
+					year.stepSize = 1;
+					year.minimum = 1900;
+					year.maximum = 2100;
+					year.width = 60;
+					year.height = 20;
+					year.value = nowTime.fullYear;
+					year.addEventListener(NumericStepperEvent.CHANGE,yearChangeHandler);
+					
+					var y_label:Label = new Label();
+					y_label.text = "年";
+					y_label.setStyle("textAlign","center");
+					y_label.width = 15;
+					
+					var month:NumericStepper = new NumericStepper();
+					month.setStyle("fontSize",10);
+					month.stepSize = 1;
+					month.minimum = 0;
+					month.maximum = 13;
+					month.width = 50;
+					month.height = 20;
+					month.value = nowTime.month+1;
+					month.addEventListener(NumericStepperEvent.CHANGE,monthChangeHandler);
+					
+					var m_label:Label = new Label();
+					m_label.text = "月";
+					m_label.setStyle("textAlign","center");
+					m_label.width = 15;
+					
+					hBoxTop.addChild(year);
+					hBoxTop.addChild(y_label);
+					hBoxTop.addChild(month);
+					hBoxTop.addChild(m_label);
+					
+					pop.addChild(hBoxTop);
+					
+					var hBox:HBox = new HBox();
+					hBox.width = m_width;
+					hBox.setStyle("horizontalGap",0);
+					var weekName:Array = new Array("日","一","二","三","四","五","六");
+					for(var index:Number=0; index<weekName.length; index++){
+						var lab:Label = new Label();
+						lab.text = weekName[index];
+						lab.width = 24;
+						lab.setStyle("textAlign","center");
+						lab.setStyle("fontSize",12);
+						if(weekName[index]=="日"){
+							lab.setStyle("color","red");
+						}
+						hBox.addChild(lab);
+					}
+					pop.addChild(hBox);
+					
+					var tmpDate:Date = new Date(nowTime.fullYear,nowTime.month+1,0);
+					var sumDay:Number = tmpDate.date ;
+					
+					var firstDay:Date = new Date(nowTime.fullYear,nowTime.month,1);
+					var wday:Number = firstDay.day ;
+					
+					var todayNum:Number = nowTime.date;
+					
+					var rowNum:uint = Math.ceil((sumDay+wday)/7);
+					//Alert.show(Math.round((sumDay+day)/7).toString());
+					
+					var tileList:TileList = new TileList();
+					tileList.setStyle("fontSize",10);
+					tileList.columnCount=7;
+					tileList.rowCount=rowNum;
+					tileList.width = 7*25;
+					tileList.height = rowNum * 25;
+					
+					var myDP:Array = new Array();
+					for(var i:Number=0; i<sumDay; i++){
+						myDP.push((i+1).toString());
+					}
+					for(i=0; i<wday; i++){
+						myDP.unshift(null);
+					}
+					tileList.dataProvider = myDP;
+					tileList.selectedIndex = wday+todayNum-1; 
+					tileList.addEventListener(ListEvent.ITEM_CLICK,testHandler);
+					pop.addChild(tileList);
+					
+					if(hasTime)
+					{
+						var hBoxBottom:HBox = new HBox();
+						hBoxBottom.width = m_width;
+						hBoxBottom.setStyle("horizontalAlign","right");
+						
+						var hour:NumericStepper = new NumericStepper();
+						hour.setStyle("fontSize",10);
+						hour.stepSize = 1;
+						hour.minimum = 0;
+						hour.maximum = 23;
+						hour.width = 50;
+						hour.height = 20;
+						hour.value = new Date().hours;
+						hour.setStyle("paddingRight",0);
+						hour.addEventListener(NumericStepperEvent.CHANGE,hourChangeHandler);
+						var h_label:Label = new Label();
+						h_label.text = "时";
+						h_label.setStyle("textAlign","center");
+						h_label.width = 15;
+						
+						var minute:NumericStepper = new NumericStepper();
+						minute.setStyle("fontSize",10);
+						minute.stepSize = 1;
+						minute.minimum = 0;
+						minute.maximum = 59;
+						minute.width = 50;
+						minute.height = 20;
+						minute.value = new Date().minutes;
+						minute.addEventListener(NumericStepperEvent.CHANGE,minuteChangeHandler);
+						var mi_label:Label = new Label();
+						mi_label.text = "分";
+						mi_label.setStyle("textAlign","center");
+						mi_label.width = 15;
+						
+						//					var subBtn:Button = new Button();
+						//					subBtn.width = 40;
+						//					subBtn.label = "确定";
+						hBoxBottom.addChild(hour);
+						hBoxBottom.addChild(h_label);
+						hBoxBottom.addChild(minute);
+						hBoxBottom.addChild(mi_label);
+						//					hBoxBottom.addChild(subBtn);
+						pop.addChild(hBoxBottom);
+					}
+					
+//					isOpen = true;
+				}else{
+					if(systemManager.contains(pop as DisplayObject)){
+						PopUpManager.removePopUp(pop as IFlexDisplayObject);
+					}
+//					isOpen = false;
+				}
+			}
+			private function closeHandler(event:Event):void{
+				if(systemManager.contains(pop as DisplayObject)){
+					PopUpManager.removePopUp(event.target as IFlexDisplayObject);
+				}
+//				isOpen = false;
+			}
+			
+			public function set text(str:String):void{
+				initvalue = str ;
+			}
+			public function get text():String{
+				return returnTime.text ;
+			}
+			
+			public function set dateTime(str:Date):void{
+				if(str==null)
+				{
+					nowTime = new Date();
+					returnTime.text = "";
+					return;
+				}
+				nowTime = str;
+				var strDate:String = nowTime.fullYear + "-" + (nowTime.month+1) + "-" + nowTime.date ;
+				if(hasTime)
+					strDate = strDate
+					+ " " + nowTime.hours + ":" + nowTime.minutes;
+//				returnTime.text = strDate;
+				returnTime.text = dateInputFormator.format(strDate);
+				
+			}
+			public function get dateTime():Date{
+				if(returnTime.text!=""&&returnTime.text!=null&&returnTime.text.length>0)
+					return nowTime ;
+				return null;
+			}
+			
+			public function set editable(str:Boolean):void{
+				initeditable = str;
+			}
+			public function get editable(): Boolean{
+				return returnTime.editable;
+			}
+			
+			protected function button1_clickHandler(event:MouseEvent):void
+			{
+				returnTime.text="";
+			}
+			
+		]]>
+	</fx:Script>
+</s:Group>

+ 17 - 0
gkaq/gis-flex/trunk/src/com/view/ui/QTextInput.as

@@ -0,0 +1,17 @@
+package com.view.ui
+{
+	import mx.controls.Alert;
+	
+	public class QTextInput extends TextInput
+	{
+		public var isNumber:Boolean;
+		public function QTextInput()
+		{
+			super();
+			this.height=28;
+			this.width=250;
+			this.setStyle("textAlign","left");
+			this.setStyle("borderColor","#d2d2d2");
+		}
+	}
+}

+ 42 - 0
gkaq/gis-flex/trunk/src/com/view/ui/TextInput.as

@@ -0,0 +1,42 @@
+package com.view.ui
+{
+	import com.view.TypeBase;
+	
+	import mx.events.FlexEvent;
+	
+	import com.skins.TextInputSkin;
+	
+	import spark.components.TextInput;
+	
+	public class TextInput extends spark.components.TextInput
+	{
+		public function TextInput()
+		{
+			super();
+			addEventListener(FlexEvent.CREATION_COMPLETE,creationComplete);
+			setStyle("skinClass",TextInputSkin);
+		}
+		
+		/********
+		 * type
+		 */
+		[Inspectable(category="General", enumeration="en,cn,int,double,email", defaultValue="cn")]
+		public var type:String;
+		
+		public function creationComplete(e:FlexEvent):void{
+			if (TypeBase.isNumberType(type))
+			{
+				super.setStyle("textAlign", "right");
+				if (type == TypeBase.DOUBLE)
+					super.restrict=TypeBase.NUM_RESTRICT;
+				if (type == TypeBase.INT)
+					super.restrict=TypeBase.INT_RESTRICT;
+			}
+			else if (type == TypeBase.EN)
+				super.restrict=TypeBase.EN_RESTRICT;
+			else if (type == TypeBase.EMAIL)
+				super.restrict=TypeBase.EMAIL_RESTRICT;
+		}
+		
+	}
+}

+ 305 - 0
gkaq/gis-flex/trunk/src/com/view/yjcz/CxTitleWindow.mxml

@@ -0,0 +1,305 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+	ADOBE SYSTEMS INCORPORATED
+	Copyright 2008 Adobe Systems Incorporated
+	All Rights Reserved.
+
+	NOTICE: Adobe permits you to use, modify, and distribute this file
+	in accordance with the terms of the license agreement accompanying it.
+
+-->
+
+<!--- The default skin class for a Spark TitleWindow container.
+
+	 @see spark.skins.spark.TitleWindowCloseButtonSkin
+	 @see spark.components.TitleWindow
+
+	 @langversion 3.0
+	 @playerversion Flash 10
+	 @playerversion AIR 1.5
+	 @productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
+			 xmlns:fb="http://ns.adobe.com/flashbuilder/2009" blendMode="normal" mouseEnabled="false"
+			 minWidth="76" minHeight="76" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5">
+
+	<fx:Metadata>
+		<![CDATA[ 
+        /** 
+         * @copy spark.skins.spark.ApplicationSkin#hostComponent
+         */
+        [HostComponent("spark.components.TitleWindow")]
+        ]]>
+	</fx:Metadata> 
+
+	<fx:Script fb:purpose="styling">
+		<![CDATA[
+			import mx.core.FlexVersion;
+
+			/* Define the skin elements that should not be colorized.
+			For panel, border and title background are skinned, but the content area, background, border, and title text are not. */
+			static private const exclusions:Array = ["background", "titleDisplay", "contentGroup", "border"];
+
+			/* exclusions before Flex 4.5 for backwards-compatibility purposes */
+			static private const exclusions_4_0:Array = ["background", "titleDisplay", "contentGroup"];
+
+			/**
+			 * @private
+			 */
+			override public function get colorizeExclusions():Array 
+			{
+				// Since border is styleable via borderColor, no need to allow chromeColor to affect
+				// the border.  This is wrapped in a compatibility flag since this change was added  
+				// in Flex 4.5
+				if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_5)
+				{
+					return exclusions_4_0;
+				}
+
+				return exclusions;
+			}
+
+			/**
+			 * @private
+			 */
+			override protected function initializationComplete():void
+			{
+				useChromeColor = true;
+				super.initializationComplete();
+			}
+
+			/**
+			 * @private
+			 */
+			override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+			{
+				if (getStyle("borderVisible") == true)
+				{
+					border.visible = true;
+					background.left = background.top = background.right = background.bottom = 1;
+					contents.left = contents.top = contents.right = contents.bottom = 1;
+				}
+				else
+				{
+					border.visible = false;
+					background.left = background.top = background.right = background.bottom = 0;
+					contents.left = contents.top = contents.right = contents.bottom = 0;
+				}
+
+				dropShadow.visible = getStyle("dropShadowVisible");
+
+				var cr:Number = getStyle("cornerRadius");
+				var withControls:Boolean = 
+					(currentState == "disabledWithControlBar" || 
+					currentState == "normalWithControlBar" ||
+					currentState == "inactiveWithControlBar");
+
+				if (cornerRadius != cr)
+				{
+					cornerRadius = cr;
+
+					dropShadow.tlRadius = cornerRadius;
+					dropShadow.trRadius = cornerRadius;
+					dropShadow.blRadius = withControls ? cornerRadius : 0;
+					dropShadow.brRadius = withControls ? cornerRadius : 0;
+
+					setPartCornerRadii(topMaskRect, withControls); 
+					setPartCornerRadii(border, withControls); 
+					setPartCornerRadii(background, withControls);
+				}
+
+				if (bottomMaskRect) setPartCornerRadii(bottomMaskRect, withControls); 
+
+				borderStroke.color = getStyle("borderColor");
+				borderStroke.alpha = getStyle("borderAlpha");
+				backgroundFill.color = getStyle("backgroundColor");
+				backgroundFill.alpha = getStyle("backgroundAlpha");
+
+				super.updateDisplayList(unscaledWidth, unscaledHeight);
+			}
+
+			/**
+			 * @private
+			 */  
+			private function setPartCornerRadii(target:Rect, includeBottom:Boolean):void
+			{            
+				target.topLeftRadiusX = cornerRadius;
+				target.topRightRadiusX = cornerRadius;
+				target.bottomLeftRadiusX = includeBottom ? cornerRadius : 0;
+				target.bottomRightRadiusX = includeBottom ? cornerRadius : 0;
+			}
+
+			private var cornerRadius:Number;
+		]]>
+	</fx:Script>
+
+	<s:states>
+		<s:State name="normal" />
+		<s:State name="inactive" stateGroups="inactiveGroup" />
+		<s:State name="disabled" />
+		<s:State name="normalWithControlBar" stateGroups="withControls" />
+		<s:State name="inactiveWithControlBar" stateGroups="withControls, inactiveGroup" />
+		<s:State name="disabledWithControlBar" stateGroups="withControls" />
+	</s:states>
+
+	<!--- drop shadow can't be hittable so it stays sibling of other graphics @private-->
+	<s:RectangularDropShadow id="dropShadow" blurX="20" blurY="20" alpha="0.32" 
+							 alpha.inactiveGroup="0.22" distance="11"  distance.inactiveGroup="7"
+							 angle="90" color="0x000000" left="0" top="0" right="0" bottom="0"/>
+
+	<!--- drop shadow can't be hittable so all other graphics go in this group -->
+	<s:Group left="0" right="0" top="0" bottom="0">
+
+		<!--- top group mask @private-->
+		<s:Group left="1" top="1" right="1" bottom="1" id="topGroupMask">
+			<!--- @private-->
+			<s:Rect id="topMaskRect" left="0" top="0" right="0" bottom="0">
+				<s:fill>
+					<s:SolidColor alpha="0"/>
+				</s:fill>
+			</s:Rect>
+		</s:Group>
+
+		<!--- bottom group mask @private-->
+		<s:Group left="1" top="1" right="1" bottom="1" id="bottomGroupMask" 
+				 includeIn="withControls">
+			<!--- @private-->
+			<s:Rect id="bottomMaskRect" left="0" top="0" right="0" bottom="0">
+				<s:fill>
+					<s:SolidColor alpha="0"/>
+				</s:fill>
+			</s:Rect>
+		</s:Group>
+
+		<!--- layer 1: border @private -->
+		<s:Rect id="border" left="0" right="0" top="0" bottom="0" >
+			<s:stroke>
+				<!--- Defines the TitleWindowSkin class's border stroke. The default value is 1. -->
+				<s:SolidColorStroke id="borderStroke" weight="1" />
+			</s:stroke>
+		</s:Rect>
+
+		<!-- layer 2: background fill -->
+		<!--- Defines the appearance of the TitleWindowSkin class's background. -->
+		<s:Rect id="background" left="1" top="1" right="1" bottom="1">
+			<s:fill>
+				<!--- Defines the TitleWindowSkin class's background fill. The default color is 0xFFFFFF. -->
+				<s:SolidColor id="backgroundFill" color="#FFFFFF"/>
+			</s:fill>
+		</s:Rect>
+
+		<!-- layer 3: contents -->
+		<!--- Contains the vertical stack of title bar content and control bar. -->
+		<s:Group left="1" right="1" top="1" bottom="1" id="contents">
+			<s:layout>
+				<s:VerticalLayout gap="0" horizontalAlign="justify" />
+			</s:layout>
+			<!--- @private -->
+			<s:Group id="topGroup" mask="{topGroupMask}">
+
+				<!--- layer 0: title bar fill @private -->
+				<s:Rect id="tbFill" left="0" right="0" top="0" bottom="1">
+					<s:fill>
+						<s:LinearGradient rotation="90">
+							<s:GradientEntry color="0x22A3BB"
+											 color.inactiveGroup="0x22A3BB"/>
+							<s:GradientEntry color="0x1E93A3"
+											 color.inactiveGroup="0x1E93A3"/>
+						</s:LinearGradient>
+					</s:fill>
+				</s:Rect>
+
+				<!--- layer 1: title bar highlight @private -->
+				<s:Rect id="tbHilite" left="0" right="0" top="0" bottom="0">
+					<s:stroke>
+						<s:LinearGradientStroke rotation="90" weight="1">
+							<s:GradientEntry color="0xE6E6E6" />
+							<s:GradientEntry color="0xFFFFFF" alpha="0.22"/>
+						</s:LinearGradientStroke>
+					</s:stroke>
+					<s:fill>
+						<s:LinearGradient rotation="90">
+							<s:GradientEntry color="0xFFFFFF" alpha="0.15" />
+							<s:GradientEntry color="0xFFFFFF" alpha="0.15" ratio="0.44"/>
+							<s:GradientEntry color="0xFFFFFF" alpha="0" ratio="0.4401"/>
+						</s:LinearGradient>
+					</s:fill>
+				</s:Rect>
+
+				<!--- layer 2: title bar divider @private -->
+				<s:Rect id="tbDiv" left="0" right="0" height="1" bottom="0">
+					<s:fill>
+						<s:SolidColor color="0x000000" alpha="0.75" />
+					</s:fill>
+				</s:Rect>
+
+				<!-- layer 3: text -->
+				<!--- @copy spark.components.Panel#titleDisplay -->
+				<s:Label id="titleDisplay" maxDisplayedLines="1"
+						 left="9" right="36" top="1" bottom="0" minHeight="30" color="#FFFFFF" textAlign="left" fontSize="18" fontFamily="微软雅黑"
+						 verticalAlign="middle" fontWeight="bold" />
+
+				<!-- layer 4: moveArea -->
+				<!--- @copy spark.components.TitleWindow#moveArea -->
+				<s:Group id="moveArea" left="0" right="0" top="0" bottom="0" />
+
+				<!--- @copy spark.components.TitleWindow#closeButton -->
+				<s:Button id="closeButton" skinClass="com.skins.TitleWindowCloseButtonSkin"
+						  width="20" height="20" right="5" top="5" />
+			</s:Group>
+
+			<!--
+				Note: setting the minimum size to 0 here so that changes to the host component's
+				size will not be thwarted by this skin part's minimum size.   This is a compromise,
+				more about it here: http://bugs.adobe.com/jira/browse/SDK-21143
+			-->
+			<!--- @copy spark.components.SkinnableContainer#contentGroup -->
+			<s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0">
+			</s:Group>
+
+			<!--- @private -->
+			<s:Group id="bottomGroup" minWidth="0" minHeight="0" 
+					 includeIn="withControls">  
+
+				<s:Group left="0" right="0" top="0" bottom="0" mask="{bottomGroupMask}">
+
+					<!-- layer 0: control bar divider line -->
+					<s:Rect left="0" right="0" top="0" height="1" alpha="0.22">
+						<s:fill>
+							<s:SolidColor color="0x000000" />
+						</s:fill>
+					</s:Rect>
+
+					<!-- layer 1: control bar highlight -->
+					<s:Rect left="0" right="0" top="1" bottom="0">
+						<s:stroke>
+							<s:LinearGradientStroke rotation="90" weight="1">
+								<s:GradientEntry color="0xFFFFFF" />
+								<s:GradientEntry color="0xD8D8D8" />
+							</s:LinearGradientStroke>
+						</s:stroke>
+					</s:Rect>
+
+					<!-- layer 2: control bar fill -->
+					<s:Rect left="1" right="1" top="2" bottom="1">
+						<s:fill>
+							<s:LinearGradient rotation="90">
+								<s:GradientEntry color="0xEDEDED"/>
+								<s:GradientEntry color="0xCDCDCD"/>
+							</s:LinearGradient>
+						</s:fill>
+					</s:Rect>
+				</s:Group>
+
+				<!--- @copy spark.components.Panel#controlBarGroup -->
+				<s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0">
+					<s:layout>
+						<s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />
+					</s:layout>
+				</s:Group>
+			</s:Group>
+		</s:Group>
+	</s:Group>
+</s:SparkSkin>

+ 93 - 0
gkaq/gis-flex/trunk/src/com/view/yjcz/ImagesDataLoader.as

@@ -0,0 +1,93 @@
+package com.view.yjcz
+{
+
+	import flash.display.BitmapData;
+	import flash.events.Event;
+	import flash.net.URLLoader;
+	import flash.net.URLRequest;
+	
+	import mx.collections.ArrayCollection;
+	import mx.controls.Alert;
+
+	/**
+	 * Load images info and bitmap data from XML file
+	 *
+	 * @author 马都喜
+	 */
+	public class ImagesDataLoader
+	{
+		private var xml:XML=new XML();
+		private var loader:URLLoader=new URLLoader();
+		private var _onComplete:Function;
+		private var imagesData:ArrayCollection;
+
+		public function ImagesDataLoader()
+		{
+		}
+
+		/**
+		 * Load images info from XML file
+		 *
+		 * Example:
+		 *   onCompleteFn(imagesData:ArrayCollection):void
+		 */
+		public function load(url:String, onComplete:Function):void{
+			_onComplete = onComplete;
+			loader.load(new URLRequest(url));
+			loader.addEventListener(Event.COMPLETE, loadComplete);
+		}
+
+		/**
+		 * Load complete, Change XML data to ArrayCollection
+		 */
+		private function loadComplete(evt:Event):void{
+			xml=XML(loader.data);
+			imagesData = new ArrayCollection();
+			if(xml){
+				for(var i:int = 0; i<xml.children().length(); i++){
+					var imgInfo:ImagesInfo = new ImagesInfo();
+					var el_img:XML = xml.img[i];
+					imgInfo.name = el_img.@name;
+					imgInfo.x = el_img.@x;
+					imgInfo.y = el_img.@y;
+					imgInfo.file = el_img.@file;
+					if(el_img.@label){
+						imgInfo.label = el_img.@label;
+					}
+					if(el_img.@type){
+						imgInfo.type = el_img.@type;
+					}
+					imagesData.addItem(imgInfo);
+				}
+			}
+			this.loadBitmapData();
+
+		}
+
+		/**
+		 * Load bitmap data from image's name
+		 */
+		private function loadBitmapData():void{
+			for(var i:int = 0; i<imagesData.length; i++){
+				var imageInfo:ImagesInfo = imagesData.getItemAt(i) as ImagesInfo;
+				imageInfo.loadBitmapData(bitmapLoadComplete);
+			}
+		}
+
+		/**
+		 * loaded
+		 */
+		private function bitmapLoadComplete(data:BitmapData):void{
+			var flag:Boolean = false;
+			for(var i:int = 0; i<imagesData.length; i++){
+				var imageInfo:ImagesInfo = imagesData.getItemAt(i) as ImagesInfo;
+				if(!imageInfo.loaded){
+					return;
+				}
+			}
+			if(!flag)
+				this._onComplete(imagesData);// Complete Load
+		}
+	}
+}
+

+ 107 - 0
gkaq/gis-flex/trunk/src/com/view/yjcz/ImagesInfo.as

@@ -0,0 +1,107 @@
+package com.view.yjcz
+{
+	import flash.display.Bitmap;
+	import flash.display.BitmapData;
+	import flash.display.Loader;
+	import flash.events.Event;
+	import flash.geom.ColorTransform;
+	import flash.geom.Matrix;
+	import flash.geom.Rectangle;
+	import flash.geom.Transform;
+	import flash.net.URLLoader;
+	import flash.net.URLLoaderDataFormat;
+	import flash.net.URLRequest;
+
+	/**
+	 * Image info model
+	 * @author 马都喜
+	 */
+	public class ImagesInfo
+	{
+		public function ImagesInfo()
+		{
+		}
+		public var type:String;
+		public var name:String;
+		public var label:String;
+		public var file:String;
+		public var x:Number;
+		public var y:Number;
+		public var bitmapData:BitmapData;
+		private var urlLoader:URLLoader = new URLLoader();
+		private var loader:Loader =  new Loader();
+		private var _loadComplete:Function;
+		public var loaded:Boolean = false;
+		/**
+		 * Gray image
+		 */
+		public function get grayBitmapData():BitmapData{
+			var w:Number = bitmapData.width;
+			var h:Number = bitmapData.height;
+			var canvas:BitmapData = new BitmapData(w, h, true, 0x00000000);
+			for(var i:int=0; i<w; i++){
+				for(var j:int=0; j<h; j++){
+					var color:uint = bitmapData.getPixel32(i, j);
+					var a:uint = (color>>24)&255;
+					var r:uint = (color>>16)&255;
+					var g:uint = (color>>8)&255;
+					var b:uint = color&255;
+					var gray:uint = (r*0.33)+(g*0.33)+(b*0.34);//0.3 0.59 0.11
+					canvas.setPixel32(i, j, (a<<24)|(gray<<16)|(gray<<8)|gray);
+				}
+			}
+			return canvas;
+		}
+
+
+		/**
+		 * Inverse image
+		 */
+		public function get inverseBitmapData():BitmapData{
+			var w:Number = bitmapData.width;
+			var h:Number = bitmapData.height;
+			var canvas:BitmapData = new BitmapData(w, h, true, 0x00000000);
+			for(var i:int=0; i<w; i++){
+				for(var j:int=0; j<h; j++){
+					var color:uint = bitmapData.getPixel32(i, j);
+					var a:uint = (color>>24)&255;
+					canvas.setPixel32(i, j, (a<<24)|(~color)&0x00FFFFFF);
+				}
+			}
+			return canvas;
+		}
+
+		/**
+		 * Load bitmap data
+		 * 	loadCompleteFunction(data:BitmapData):void
+		 */
+		public function loadBitmapData(loadComplete:Function):void{
+			_loadComplete = loadComplete;
+			if(bitmapData){
+				_loadComplete(bitmapData);
+				return;
+			}
+			if(name){
+				urlLoader.dataFormat = URLLoaderDataFormat.BINARY;
+				urlLoader.load(new URLRequest(file));
+				urlLoader.addEventListener(Event.COMPLETE, urlLoaderComplete);
+			}
+		}
+
+		private function urlLoaderComplete(event:Event):void{
+			loader.loadBytes(urlLoader.data);
+			loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
+		}
+
+		private function loaderComplete(event:Event):void{
+			var tmpData:BitmapData = new BitmapData(loader.width, loader.height, true, 0);
+			tmpData.draw(loader);
+			bitmapData =  tmpData;
+			loaded = true;
+			_loadComplete(bitmapData);
+			loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, loaderComplete);
+
+		}
+	}
+}
+

+ 305 - 0
gkaq/gis-flex/trunk/src/com/view/yjcz/QtTitleWindow.mxml

@@ -0,0 +1,305 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+	ADOBE SYSTEMS INCORPORATED
+	Copyright 2008 Adobe Systems Incorporated
+	All Rights Reserved.
+
+	NOTICE: Adobe permits you to use, modify, and distribute this file
+	in accordance with the terms of the license agreement accompanying it.
+
+-->
+
+<!--- The default skin class for a Spark TitleWindow container.
+
+	 @see spark.skins.spark.TitleWindowCloseButtonSkin
+	 @see spark.components.TitleWindow
+
+	 @langversion 3.0
+	 @playerversion Flash 10
+	 @playerversion AIR 1.5
+	 @productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
+			 xmlns:fb="http://ns.adobe.com/flashbuilder/2009" blendMode="normal" mouseEnabled="false"
+			 minWidth="76" minHeight="76" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5">
+
+	<fx:Metadata>
+		<![CDATA[ 
+        /** 
+         * @copy spark.skins.spark.ApplicationSkin#hostComponent
+         */
+        [HostComponent("spark.components.TitleWindow")]
+        ]]>
+	</fx:Metadata> 
+
+	<fx:Script fb:purpose="styling">
+		<![CDATA[
+			import mx.core.FlexVersion;
+
+			/* Define the skin elements that should not be colorized.
+			For panel, border and title background are skinned, but the content area, background, border, and title text are not. */
+			static private const exclusions:Array = ["background", "titleDisplay", "contentGroup", "border"];
+
+			/* exclusions before Flex 4.5 for backwards-compatibility purposes */
+			static private const exclusions_4_0:Array = ["background", "titleDisplay", "contentGroup"];
+
+			/**
+			 * @private
+			 */
+			override public function get colorizeExclusions():Array 
+			{
+				// Since border is styleable via borderColor, no need to allow chromeColor to affect
+				// the border.  This is wrapped in a compatibility flag since this change was added  
+				// in Flex 4.5
+				if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_5)
+				{
+					return exclusions_4_0;
+				}
+
+				return exclusions;
+			}
+
+			/**
+			 * @private
+			 */
+			override protected function initializationComplete():void
+			{
+				useChromeColor = true;
+				super.initializationComplete();
+			}
+
+			/**
+			 * @private
+			 */
+			override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+			{
+				if (getStyle("borderVisible") == true)
+				{
+					border.visible = true;
+					background.left = background.top = background.right = background.bottom = 1;
+					contents.left = contents.top = contents.right = contents.bottom = 1;
+				}
+				else
+				{
+					border.visible = false;
+					background.left = background.top = background.right = background.bottom = 0;
+					contents.left = contents.top = contents.right = contents.bottom = 0;
+				}
+
+				dropShadow.visible = getStyle("dropShadowVisible");
+
+				var cr:Number = getStyle("cornerRadius");
+				var withControls:Boolean = 
+					(currentState == "disabledWithControlBar" || 
+					currentState == "normalWithControlBar" ||
+					currentState == "inactiveWithControlBar");
+
+				if (cornerRadius != cr)
+				{
+					cornerRadius = cr;
+
+					dropShadow.tlRadius = cornerRadius;
+					dropShadow.trRadius = cornerRadius;
+					dropShadow.blRadius = withControls ? cornerRadius : 0;
+					dropShadow.brRadius = withControls ? cornerRadius : 0;
+
+					setPartCornerRadii(topMaskRect, withControls); 
+					setPartCornerRadii(border, withControls); 
+					setPartCornerRadii(background, withControls);
+				}
+
+				if (bottomMaskRect) setPartCornerRadii(bottomMaskRect, withControls); 
+
+				borderStroke.color = getStyle("borderColor");
+				borderStroke.alpha = getStyle("borderAlpha");
+				backgroundFill.color = getStyle("backgroundColor");
+				backgroundFill.alpha = getStyle("backgroundAlpha");
+
+				super.updateDisplayList(unscaledWidth, unscaledHeight);
+			}
+
+			/**
+			 * @private
+			 */  
+			private function setPartCornerRadii(target:Rect, includeBottom:Boolean):void
+			{            
+				target.topLeftRadiusX = cornerRadius;
+				target.topRightRadiusX = cornerRadius;
+				target.bottomLeftRadiusX = includeBottom ? cornerRadius : 0;
+				target.bottomRightRadiusX = includeBottom ? cornerRadius : 0;
+			}
+
+			private var cornerRadius:Number;
+		]]>
+	</fx:Script>
+
+	<s:states>
+		<s:State name="normal" />
+		<s:State name="inactive" stateGroups="inactiveGroup" />
+		<s:State name="disabled" />
+		<s:State name="normalWithControlBar" stateGroups="withControls" />
+		<s:State name="inactiveWithControlBar" stateGroups="withControls, inactiveGroup" />
+		<s:State name="disabledWithControlBar" stateGroups="withControls" />
+	</s:states>
+
+	<!--- drop shadow can't be hittable so it stays sibling of other graphics @private-->
+	<s:RectangularDropShadow id="dropShadow" blurX="20" blurY="20" alpha="0.32" 
+							 alpha.inactiveGroup="0.22" distance="11"  distance.inactiveGroup="7"
+							 angle="90" color="0x000000" left="0" top="0" right="0" bottom="0"/>
+
+	<!--- drop shadow can't be hittable so all other graphics go in this group -->
+	<s:Group left="0" right="0" top="0" bottom="0">
+
+		<!--- top group mask @private-->
+		<s:Group left="1" top="1" right="1" bottom="1" id="topGroupMask">
+			<!--- @private-->
+			<s:Rect id="topMaskRect" left="0" top="0" right="0" bottom="0">
+				<s:fill>
+					<s:SolidColor alpha="0"/>
+				</s:fill>
+			</s:Rect>
+		</s:Group>
+
+		<!--- bottom group mask @private-->
+		<s:Group left="1" top="1" right="1" bottom="1" id="bottomGroupMask" 
+				 includeIn="withControls">
+			<!--- @private-->
+			<s:Rect id="bottomMaskRect" left="0" top="0" right="0" bottom="0">
+				<s:fill>
+					<s:SolidColor alpha="0"/>
+				</s:fill>
+			</s:Rect>
+		</s:Group>
+
+		<!--- layer 1: border @private -->
+		<s:Rect id="border" left="0" right="0" top="0" bottom="0" >
+			<s:stroke>
+				<!--- Defines the TitleWindowSkin class's border stroke. The default value is 1. -->
+				<s:SolidColorStroke id="borderStroke" weight="1" />
+			</s:stroke>
+		</s:Rect>
+
+		<!-- layer 2: background fill -->
+		<!--- Defines the appearance of the TitleWindowSkin class's background. -->
+		<s:Rect id="background" left="1" top="1" right="1" bottom="1">
+			<s:fill>
+				<!--- Defines the TitleWindowSkin class's background fill. The default color is 0xFFFFFF. -->
+				<s:SolidColor id="backgroundFill" color="#FFFFFF"/>
+			</s:fill>
+		</s:Rect>
+
+		<!-- layer 3: contents -->
+		<!--- Contains the vertical stack of title bar content and control bar. -->
+		<s:Group left="1" right="1" top="1" bottom="1" id="contents">
+			<s:layout>
+				<s:VerticalLayout gap="0" horizontalAlign="justify" />
+			</s:layout>
+			<!--- @private -->
+			<s:Group id="topGroup" mask="{topGroupMask}">
+
+				<!--- layer 0: title bar fill @private -->
+				<s:Rect id="tbFill" left="0" right="0" top="0" bottom="1">
+					<s:fill>
+						<s:LinearGradient rotation="90">
+							<s:GradientEntry color="0x29A8E2"
+											 color.inactiveGroup="0x29A8E2"/>
+							<s:GradientEntry color="0x3E76A8"
+											 color.inactiveGroup="0x3E76A8"/>
+						</s:LinearGradient>
+					</s:fill>
+				</s:Rect>
+
+				<!--- layer 1: title bar highlight @private -->
+				<s:Rect id="tbHilite" left="0" right="0" top="0" bottom="0">
+					<s:stroke>
+						<s:LinearGradientStroke rotation="90" weight="1">
+							<s:GradientEntry color="0xE6E6E6" />
+							<s:GradientEntry color="0xFFFFFF" alpha="0.22"/>
+						</s:LinearGradientStroke>
+					</s:stroke>
+					<s:fill>
+						<s:LinearGradient rotation="90">
+							<s:GradientEntry color="0xFFFFFF" alpha="0.15" />
+							<s:GradientEntry color="0xFFFFFF" alpha="0.15" ratio="0.44"/>
+							<s:GradientEntry color="0xFFFFFF" alpha="0" ratio="0.4401"/>
+						</s:LinearGradient>
+					</s:fill>
+				</s:Rect>
+
+				<!--- layer 2: title bar divider @private -->
+				<s:Rect id="tbDiv" left="0" right="0" height="1" bottom="0">
+					<s:fill>
+						<s:SolidColor color="0x000000" alpha="0.75" />
+					</s:fill>
+				</s:Rect>
+
+				<!-- layer 3: text -->
+				<!--- @copy spark.components.Panel#titleDisplay -->
+				<s:Label id="titleDisplay" maxDisplayedLines="1"
+						 left="9" right="36" top="1" bottom="0" minHeight="30" fontSize="18" color="#FFFFFF" textAlign="left" fontFamily="微软雅黑"
+						 verticalAlign="middle" fontWeight="bold" />
+
+				<!-- layer 4: moveArea -->
+				<!--- @copy spark.components.TitleWindow#moveArea -->
+				<s:Group id="moveArea" left="0" right="0" top="0" bottom="0" />
+
+				<!--- @copy spark.components.TitleWindow#closeButton -->
+				<s:Button id="closeButton" skinClass="com.skins.TitleWindowCloseButtonSkin"
+						  width="20" height="20" right="5" top="5" />
+			</s:Group>
+
+			<!--
+				Note: setting the minimum size to 0 here so that changes to the host component's
+				size will not be thwarted by this skin part's minimum size.   This is a compromise,
+				more about it here: http://bugs.adobe.com/jira/browse/SDK-21143
+			-->
+			<!--- @copy spark.components.SkinnableContainer#contentGroup -->
+			<s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0">
+			</s:Group>
+
+			<!--- @private -->
+			<s:Group id="bottomGroup" minWidth="0" minHeight="0" 
+					 includeIn="withControls">  
+
+				<s:Group left="0" right="0" top="0" bottom="0" mask="{bottomGroupMask}">
+
+					<!-- layer 0: control bar divider line -->
+					<s:Rect left="0" right="0" top="0" height="1" alpha="0.22">
+						<s:fill>
+							<s:SolidColor color="0x000000" />
+						</s:fill>
+					</s:Rect>
+
+					<!-- layer 1: control bar highlight -->
+					<s:Rect left="0" right="0" top="1" bottom="0">
+						<s:stroke>
+							<s:LinearGradientStroke rotation="90" weight="1">
+								<s:GradientEntry color="0xFFFFFF" />
+								<s:GradientEntry color="0xD8D8D8" />
+							</s:LinearGradientStroke>
+						</s:stroke>
+					</s:Rect>
+
+					<!-- layer 2: control bar fill -->
+					<s:Rect left="1" right="1" top="2" bottom="1">
+						<s:fill>
+							<s:LinearGradient rotation="90">
+								<s:GradientEntry color="0xEDEDED"/>
+								<s:GradientEntry color="0xCDCDCD"/>
+							</s:LinearGradient>
+						</s:fill>
+					</s:Rect>
+				</s:Group>
+
+				<!--- @copy spark.components.Panel#controlBarGroup -->
+				<s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0">
+					<s:layout>
+						<s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />
+					</s:layout>
+				</s:Group>
+			</s:Group>
+		</s:Group>
+	</s:Group>
+</s:SparkSkin>

+ 305 - 0
gkaq/gis-flex/trunk/src/com/view/yjcz/XzTitleWindow.mxml

@@ -0,0 +1,305 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+	ADOBE SYSTEMS INCORPORATED
+	Copyright 2008 Adobe Systems Incorporated
+	All Rights Reserved.
+
+	NOTICE: Adobe permits you to use, modify, and distribute this file
+	in accordance with the terms of the license agreement accompanying it.
+
+-->
+
+<!--- The default skin class for a Spark TitleWindow container.
+
+	 @see spark.skins.spark.TitleWindowCloseButtonSkin
+	 @see spark.components.TitleWindow
+
+	 @langversion 3.0
+	 @playerversion Flash 10
+	 @playerversion AIR 1.5
+	 @productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
+			 xmlns:fb="http://ns.adobe.com/flashbuilder/2009" blendMode="normal" mouseEnabled="false"
+			 minWidth="76" minHeight="76" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5">
+
+	<fx:Metadata>
+		<![CDATA[ 
+        /** 
+         * @copy spark.skins.spark.ApplicationSkin#hostComponent
+         */
+        [HostComponent("spark.components.TitleWindow")]
+        ]]>
+	</fx:Metadata> 
+
+	<fx:Script fb:purpose="styling">
+		<![CDATA[
+			import mx.core.FlexVersion;
+
+			/* Define the skin elements that should not be colorized.
+			For panel, border and title background are skinned, but the content area, background, border, and title text are not. */
+			static private const exclusions:Array = ["background", "titleDisplay", "contentGroup", "border"];
+
+			/* exclusions before Flex 4.5 for backwards-compatibility purposes */
+			static private const exclusions_4_0:Array = ["background", "titleDisplay", "contentGroup"];
+
+			/**
+			 * @private
+			 */
+			override public function get colorizeExclusions():Array 
+			{
+				// Since border is styleable via borderColor, no need to allow chromeColor to affect
+				// the border.  This is wrapped in a compatibility flag since this change was added  
+				// in Flex 4.5
+				if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_5)
+				{
+					return exclusions_4_0;
+				}
+
+				return exclusions;
+			}
+
+			/**
+			 * @private
+			 */
+			override protected function initializationComplete():void
+			{
+				useChromeColor = true;
+				super.initializationComplete();
+			}
+
+			/**
+			 * @private
+			 */
+			override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+			{
+				if (getStyle("borderVisible") == true)
+				{
+					border.visible = true;
+					background.left = background.top = background.right = background.bottom = 1;
+					contents.left = contents.top = contents.right = contents.bottom = 1;
+				}
+				else
+				{
+					border.visible = false;
+					background.left = background.top = background.right = background.bottom = 0;
+					contents.left = contents.top = contents.right = contents.bottom = 0;
+				}
+
+				dropShadow.visible = getStyle("dropShadowVisible");
+
+				var cr:Number = getStyle("cornerRadius");
+				var withControls:Boolean = 
+					(currentState == "disabledWithControlBar" || 
+					currentState == "normalWithControlBar" ||
+					currentState == "inactiveWithControlBar");
+
+				if (cornerRadius != cr)
+				{
+					cornerRadius = cr;
+
+					dropShadow.tlRadius = cornerRadius;
+					dropShadow.trRadius = cornerRadius;
+					dropShadow.blRadius = withControls ? cornerRadius : 0;
+					dropShadow.brRadius = withControls ? cornerRadius : 0;
+
+					setPartCornerRadii(topMaskRect, withControls); 
+					setPartCornerRadii(border, withControls); 
+					setPartCornerRadii(background, withControls);
+				}
+
+				if (bottomMaskRect) setPartCornerRadii(bottomMaskRect, withControls); 
+
+				borderStroke.color = getStyle("borderColor");
+				borderStroke.alpha = getStyle("borderAlpha");
+				backgroundFill.color = getStyle("backgroundColor");
+				backgroundFill.alpha = getStyle("backgroundAlpha");
+
+				super.updateDisplayList(unscaledWidth, unscaledHeight);
+			}
+
+			/**
+			 * @private
+			 */  
+			private function setPartCornerRadii(target:Rect, includeBottom:Boolean):void
+			{            
+				target.topLeftRadiusX = cornerRadius;
+				target.topRightRadiusX = cornerRadius;
+				target.bottomLeftRadiusX = includeBottom ? cornerRadius : 0;
+				target.bottomRightRadiusX = includeBottom ? cornerRadius : 0;
+			}
+
+			private var cornerRadius:Number;
+		]]>
+	</fx:Script>
+
+	<s:states>
+		<s:State name="normal" />
+		<s:State name="inactive" stateGroups="inactiveGroup" />
+		<s:State name="disabled" />
+		<s:State name="normalWithControlBar" stateGroups="withControls" />
+		<s:State name="inactiveWithControlBar" stateGroups="withControls, inactiveGroup" />
+		<s:State name="disabledWithControlBar" stateGroups="withControls" />
+	</s:states>
+
+	<!--- drop shadow can't be hittable so it stays sibling of other graphics @private-->
+	<s:RectangularDropShadow id="dropShadow" blurX="20" blurY="20" alpha="0.32" 
+							 alpha.inactiveGroup="0.22" distance="11"  distance.inactiveGroup="7"
+							 angle="90" color="0x000000" left="0" top="0" right="0" bottom="0"/>
+
+	<!--- drop shadow can't be hittable so all other graphics go in this group -->
+	<s:Group left="0" right="0" top="0" bottom="0">
+
+		<!--- top group mask @private-->
+		<s:Group left="1" top="1" right="1" bottom="1" id="topGroupMask">
+			<!--- @private-->
+			<s:Rect id="topMaskRect" left="0" top="0" right="0" bottom="0">
+				<s:fill>
+					<s:SolidColor alpha="0"/>
+				</s:fill>
+			</s:Rect>
+		</s:Group>
+
+		<!--- bottom group mask @private-->
+		<s:Group left="1" top="1" right="1" bottom="1" id="bottomGroupMask" 
+				 includeIn="withControls">
+			<!--- @private-->
+			<s:Rect id="bottomMaskRect" left="0" top="0" right="0" bottom="0">
+				<s:fill>
+					<s:SolidColor alpha="0"/>
+				</s:fill>
+			</s:Rect>
+		</s:Group>
+
+		<!--- layer 1: border @private -->
+		<s:Rect id="border" left="0" right="0" top="0" bottom="0" >
+			<s:stroke>
+				<!--- Defines the TitleWindowSkin class's border stroke. The default value is 1. -->
+				<s:SolidColorStroke id="borderStroke" weight="1" />
+			</s:stroke>
+		</s:Rect>
+
+		<!-- layer 2: background fill -->
+		<!--- Defines the appearance of the TitleWindowSkin class's background. -->
+		<s:Rect id="background" left="1" top="1" right="1" bottom="1">
+			<s:fill>
+				<!--- Defines the TitleWindowSkin class's background fill. The default color is 0xFFFFFF. -->
+				<s:SolidColor id="backgroundFill" color="#FFFFFF"/>
+			</s:fill>
+		</s:Rect>
+
+		<!-- layer 3: contents -->
+		<!--- Contains the vertical stack of title bar content and control bar. -->
+		<s:Group left="1" right="1" top="1" bottom="1" id="contents">
+			<s:layout>
+				<s:VerticalLayout gap="0" horizontalAlign="justify" />
+			</s:layout>
+			<!--- @private -->
+			<s:Group id="topGroup" mask="{topGroupMask}">
+
+				<!--- layer 0: title bar fill @private -->
+				<s:Rect id="tbFill" left="0" right="0" top="0" bottom="1">
+					<s:fill>
+						<s:LinearGradient rotation="90">
+							<s:GradientEntry color="0x27B377"
+											 color.inactiveGroup="0x27B377"/>
+							<s:GradientEntry color="0x23A06B"
+											 color.inactiveGroup="0x23A06B"/>
+						</s:LinearGradient>
+					</s:fill>
+				</s:Rect>
+
+				<!--- layer 1: title bar highlight @private -->
+				<s:Rect id="tbHilite" left="0" right="0" top="0" bottom="0">
+					<s:stroke>
+						<s:LinearGradientStroke rotation="90" weight="1">
+							<s:GradientEntry color="0xE6E6E6" />
+							<s:GradientEntry color="0xFFFFFF" alpha="0.22"/>
+						</s:LinearGradientStroke>
+					</s:stroke>
+					<s:fill>
+						<s:LinearGradient rotation="90">
+							<s:GradientEntry color="0xFFFFFF" alpha="0.15" />
+							<s:GradientEntry color="0xFFFFFF" alpha="0.15" ratio="0.44"/>
+							<s:GradientEntry color="0xFFFFFF" alpha="0" ratio="0.4401"/>
+						</s:LinearGradient>
+					</s:fill>
+				</s:Rect>
+
+				<!--- layer 2: title bar divider @private -->
+				<s:Rect id="tbDiv" left="0" right="0" height="1" bottom="0">
+					<s:fill>
+						<s:SolidColor color="0x000000" alpha="0.75" />
+					</s:fill>
+				</s:Rect>
+
+				<!-- layer 3: text -->
+				<!--- @copy spark.components.Panel#titleDisplay -->
+				<s:Label id="titleDisplay" maxDisplayedLines="1"
+						 left="9" right="36" top="1" bottom="0" minHeight="30" fontSize="18" color="#FFFFFF" fontFamily="微软雅黑"
+						 verticalAlign="middle" fontWeight="bold" textAlign="center" />
+
+				<!-- layer 4: moveArea -->
+				<!--- @copy spark.components.TitleWindow#moveArea -->
+				<s:Group id="moveArea" left="0" right="0" top="0" bottom="0" />
+
+				<!--- @copy spark.components.TitleWindow#closeButton -->
+				<s:Button id="closeButton" skinClass="com.skins.TitleWindowCloseButtonSkin"
+						  width="20" height="20" right="5" top="5" />
+			</s:Group>
+
+			<!--
+				Note: setting the minimum size to 0 here so that changes to the host component's
+				size will not be thwarted by this skin part's minimum size.   This is a compromise,
+				more about it here: http://bugs.adobe.com/jira/browse/SDK-21143
+			-->
+			<!--- @copy spark.components.SkinnableContainer#contentGroup -->
+			<s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0">
+			</s:Group>
+
+			<!--- @private -->
+			<s:Group id="bottomGroup" minWidth="0" minHeight="0" 
+					 includeIn="withControls">  
+
+				<s:Group left="0" right="0" top="0" bottom="0" mask="{bottomGroupMask}">
+
+					<!-- layer 0: control bar divider line -->
+					<s:Rect left="0" right="0" top="0" height="1" alpha="0.22">
+						<s:fill>
+							<s:SolidColor color="0x000000" />
+						</s:fill>
+					</s:Rect>
+
+					<!-- layer 1: control bar highlight -->
+					<s:Rect left="0" right="0" top="1" bottom="0">
+						<s:stroke>
+							<s:LinearGradientStroke rotation="90" weight="1">
+								<s:GradientEntry color="0xFFFFFF" />
+								<s:GradientEntry color="0xD8D8D8" />
+							</s:LinearGradientStroke>
+						</s:stroke>
+					</s:Rect>
+
+					<!-- layer 2: control bar fill -->
+					<s:Rect left="1" right="1" top="2" bottom="1">
+						<s:fill>
+							<s:LinearGradient rotation="90">
+								<s:GradientEntry color="0xEDEDED"/>
+								<s:GradientEntry color="0xCDCDCD"/>
+							</s:LinearGradient>
+						</s:fill>
+					</s:Rect>
+				</s:Group>
+
+				<!--- @copy spark.components.Panel#controlBarGroup -->
+				<s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0">
+					<s:layout>
+						<s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />
+					</s:layout>
+				</s:Group>
+			</s:Group>
+		</s:Group>
+	</s:Group>
+</s:SparkSkin>

+ 298 - 0
gkaq/gis-flex/trunk/src/com/view/yjcz/YjczWindow.mxml

@@ -0,0 +1,298 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009" 
+			   xmlns:s="library://ns.adobe.com/flex/spark" 
+			   xmlns:mx="library://ns.adobe.com/flex/mx" width="600" height="100%" creationComplete="init(event)" xmlns:view="com.view.*"
+			   close="windowCloseHandler(event)" title="应急处置" skinClass="com.view.yjcz.CxTitleWindow" windowMove="windowMoveFunction(event)">
+	<s:layout>
+		<s:VerticalLayout/>
+	</s:layout>
+	<fx:Script>
+		<![CDATA[
+			import com.common.ConstUtil;
+			import com.view.CodeVo;
+			
+			import mx.collections.ArrayCollection;
+			import mx.collections.XMLListCollection;
+			import mx.controls.Alert;
+			import mx.core.ContainerCreationPolicy;
+			import mx.core.FlexGlobals;
+			import mx.core.UIComponent;
+			import mx.events.CloseEvent;
+			import mx.events.FlexEvent;
+			import mx.events.ResizeEvent;
+			import mx.managers.PopUpManager;
+			
+			import spark.components.Group;
+			import spark.events.TitleWindowBoundsEvent;
+			private var tmpTitleWindow:TitleWindow;
+			import spark.components.Scroller;
+			private var imgList:ArrayCollection;
+			[Bindable]
+			private var  NO_SOURCE:String="images/yjdd/noSource.png";
+			[Bindable]
+			private var  YZ_SOURCE:String="images/yjdd/noSource.png";
+			[Bindable]
+			private var vtitle:String="";
+			[Bindable]  
+			private var blankCode:CodeVo;
+			protected static var yzDataXML:XML=
+				<SjlxSelect>
+					<item id="0" localeName="sjlx.yz" source="images/yjdd/yz.png" data="images/yjdd/position/yz-data.xml"/>
+					<item id="1" localeName="sjlx.yryb" source="images/yjdd/1.1.png" data="images/yjdd/position/1.1-data.xml"/>    
+					<item id="2" localeName="sjlx.ydyh"  source="images/yjdd/1.2.png" data="images/yjdd/position/1.2-data.xml"/>    
+					<item id="3" localeName="sjlx.ztdhz"  source="images/yjdd/1.3.png" data="images/yjdd/position/1.3-data.xml"/>   
+					<item id="4" localeName="sjlx.ztdbz"  source="images/yjdd/1.4.png" data="images/yjdd/position/1.4-data.xml"/>   
+					<item id="5" localeName="sjlx.ztdypxl"  source="images/yjdd/1.5.png" data="images/yjdd/position/1.5-data.xml"/> 
+					<item id="6" localeName="sjlx.ztdzrzh"  source="images/yjdd/1.6.png" data="images/yjdd/position/1.6-data.xml"/> 
+				</SjlxSelect>
+				;
+			protected static var njDataXML:XML=
+				<SexSelect>
+					<item id="0" localeName="sjlxnj.1" source="images/yjdd/nj/nj1.png" data="images/yjdd/position/nj-data.xml"/>
+					<item id="1" localeName="sjlxnj.2" source="images/yjdd/nj/nj2.png" data="images/yjdd/position/nj2-data.xml"/>    
+				</SexSelect>
+				;
+			[Bindable]
+			public var selectedSjlx:int=0;
+			[Bindable]
+			public var selectSzd:Number=0;
+			private var inted:Boolean = false;
+			protected function windowCloseHandler(event:CloseEvent):void
+			{
+				PopUpManager.removePopUp(this);
+			}
+			protected function init(event:FlexEvent):void
+			{
+				
+				if(ConstUtil.currSzd !=900){
+					yaszd.selectedID=ConstUtil.currSzd;
+					yaszd.enabled=false;
+				}else{
+					yaszd.selectedID=900;
+					yaszd.enabled=true;
+				}
+				
+				blankCode= new CodeVo();
+				blankCode.id=900;
+				blankCode.code="900";
+				blankCode.label="江苏省";
+				this.height = FlexGlobals.topLevelApplication.height;
+				var szd:Number = 900;
+				var dataXml:String;
+				sjlx.textInput.editable = false;
+				sjlx.textInput.setStyle("borderColor","#d2d2d2");
+				sjlx.selectedIndex = selectedSjlx;
+				setSjlxBySzd(szd);
+				if(szd==900){//省局
+					YZ_SOURCE="images/yjdd/sj/sj.png";
+					dataXml="images/yjdd/position/sj-data.xml";
+				}else if(szd==90011){
+					YZ_SOURCE="images/yjdd/yz.png";
+					dataXml="images/yjdd/position/yz-data.xml";
+				}else if(szd==90014){//南京
+					YZ_SOURCE="images/yjdd/nj/nj1.png";
+					dataXml="images/yjdd/position/nj-data.xml";
+				}else if(szd==90018){//泰州
+					YZ_SOURCE="images/yjdd/tz/tz.png";
+					dataXml="";
+				}else if(szd==90023){//淮安
+					YZ_SOURCE="images/yjdd/ha/ha.png";
+					dataXml="images/yjdd/position/ha-data.xml";
+				} else{
+					YZ_SOURCE = NO_SOURCE;
+				}
+				var loader:ImagesDataLoader=new ImagesDataLoader();
+				image.source=YZ_SOURCE;
+				loader.load(dataXml,dataLoadComplete);
+				inted = true;
+				yappFun(null);
+			}
+			private function dataLoadComplete(imagesData:ArrayCollection):void{
+				var img:Image;
+				if(null!=imgList){
+					for each(var image:Image in imgList){
+						imageGroup.removeElement(image);
+					}
+				}
+				imgList=new ArrayCollection;
+				for each(var imgInfo:ImagesInfo in imagesData){
+					img=new Image;
+					img.styleName=imgInfo.type;
+					img.name=imgInfo.label;
+					img.id=imgInfo.name;
+					img.x=imgInfo.x;
+					img.y=imgInfo.y;
+					img.source = imgInfo.bitmapData;
+					img.alpha=0;
+					img.addEventListener(MouseEvent.CLICK, imgOnClick);
+					img.addEventListener(MouseEvent.MOUSE_OVER,function(e:Event):void{
+						Mouse.cursor=MouseCursor.BUTTON;
+					});
+					img.addEventListener(MouseEvent.MOUSE_OUT,function(e:Event):void{
+						Mouse.cursor=MouseCursor.ARROW;
+					});
+					imgList.addItem(img);
+					imageGroup.addElement(img);
+				}
+			}
+			private function imgOnClick(event:MouseEvent):void{
+				var ui:UIComponent=event.target as UIComponent;
+				var img:Image=ui.parent as Image;
+				var globalPoint:Point=img.localToGlobal(new Point);
+				globalPoint.x+=img.width;
+				var popImg:Image=new Image;
+				popImg.source=img.id;
+				vtitle=img.name;
+				var tip:TitleWindow=new TitleWindow;
+				tip.title=vtitle;
+				tip.maxHeight=650;
+				if(vtitle.length==vtitle.search("组")+1){
+					tip.setStyle("skinClass",XzTitleWindow);
+				}else if(-1!=vtitle.search("程序")){
+					tip.setStyle("skinClass",CxTitleWindow);
+				}else{
+					tip.setStyle("skinClass",QtTitleWindow);
+				}
+				var group:Group=new Group;
+				group.addElement(popImg);
+				group.maxHeight=618;
+				var sc:Scroller=new Scroller;
+				sc.viewport=group;
+				tip.addElement(sc);
+				tip.creationPolicy=ContainerCreationPolicy.ALL;
+				
+				if(tmpTitleWindow)
+					PopUpManager.removePopUp(tmpTitleWindow);
+				var toi:Boolean//text or image 文本非模态,图片模态
+				if(img.styleName=="1"){
+					toi=false;
+					tmpTitleWindow=tip;
+				}else if(img.styleName=="0"){
+					toi=true;
+				}
+				tip.addEventListener(CloseEvent.CLOSE,function():void{
+					tip.removeAllElements();
+					PopUpManager.removePopUp(tip)});
+				PopUpManager.addPopUp(tip,image as DisplayObject,toi);
+				if(toi)
+				{
+					PopUpManager.centerPopUp(tip);
+				}else{
+					tip.x=globalPoint.x;
+					tip.y = globalPoint.y
+				}
+				tip.addEventListener(TitleWindowBoundsEvent.WINDOW_MOVE,windowMoveFunction);
+				popImg.addEventListener(ResizeEvent.RESIZE,function():void{
+					if(toi){
+						PopUpManager.centerPopUp(tip);
+					}else{
+						tip.move(globalPoint.x,globalPoint.y);
+					}
+				});
+			}
+			protected function fieldTypeLabel(item:Object):String
+			{
+				if(null != item){
+					return resourceManager.getString('select',item.@localeName);
+				}
+				return "";
+			}
+			public function yappFun(event:MouseEvent):void
+			{
+				if(!inted)
+				{
+					return;
+				}
+				if(tmpTitleWindow)
+					PopUpManager.removePopUp(tmpTitleWindow);
+				var loader:ImagesDataLoader=new ImagesDataLoader();
+				var url:String;
+				if(yaszd.selectedID==90011){//镇江
+					if(-1!=sjlx.selectedIndex){
+						image.source=String(sjlx.selectedItem.@source);
+						url=String(sjlx.selectedItem.@data);
+						loader.load(url,dataLoadComplete);
+					}
+					else{
+						image.source="images/yjdd/yz.png";
+						loader.load("images/yjdd/position/yz-data.xml",dataLoadComplete);
+					}
+				}else if(yaszd.selectedID==90014){//南京
+					if(-1!=sjlx.selectedIndex){
+						image.source=String(sjlx.selectedItem.@source);
+						url=String(sjlx.selectedItem.@data);
+						loader.load(url,dataLoadComplete);
+					}
+					else{
+						image.source="images/yjdd/nj/nj1.png";
+						loader.load("images/yjdd/position/nj-data.xml",dataLoadComplete);
+					}
+				}
+				else if(yaszd.selectedID==90023){//淮安
+					image.source="images/yjdd/ha/ha.png";
+					loader.load("images/yjdd/position/ha-data.xml",dataLoadComplete);
+				}
+				else if(yaszd.selectedID==90018){//泰州
+					image.source="images/yjdd/tz/tz.png";
+				}
+				else if(yaszd.selectedID==900){//省局
+					image.source="images/yjdd/sj/sj.png";
+					loader.load("images/yjdd/position/sj-data.xml",dataLoadComplete);
+				}
+				else{
+					image.source=NO_SOURCE;
+				}
+			}
+			private function windowMoveFunction(event:Event):void
+			{
+				event.target.x = event.target.x < 0 ? 0 : event.target.x;
+				event.target.x = event.target.x + event.target.width > event.target.parent.width ? event.target.parent.width - event.target.width : event.target.x;
+				event.target.y = event.target.y < 0 ? 0 : event.target.y;
+				event.target.y = event.target.y + event.target.height > event.target.parent.height ? event.target.parent.height - event.target.height : event.target.y;
+			}
+			
+			private function setSjlxBySzd(szd:Number):void
+			{
+				if(szd==90011){//镇江
+					sjlx.visible=true;
+					sjlxLabel.visible=true;
+					sjlx.dataProvider= new XMLListCollection(yzDataXML..item);
+					sjlx.selectedIndex =0;
+				}else if(szd==90014){//南京
+					sjlx.visible=true;
+					sjlxLabel.visible=true;
+					sjlx.dataProvider= new XMLListCollection(njDataXML..item);
+					sjlx.selectedIndex =0;
+				}else{
+					sjlx.visible=false;
+					sjlxLabel.visible=false;
+					sjlx.dataProvider= new XMLListCollection();
+					sjlx.selectedIndex=-1;
+				}
+	
+			}
+			protected function getSjlx(event:Event):void
+			{
+				setSjlxBySzd(yaszd.selectedID);
+			}
+		]]>
+	</fx:Script>
+	<fx:Declarations>
+		<!-- Place non-visual elements (e.g., services, value objects) here -->
+	</fx:Declarations>
+	<s:HGroup width="100%" height="40" minHeight="40" gap="0" horizontalAlign="left"
+			  verticalAlign="middle">
+		<s:Label width="45" styleName="head" text="所在地" textAlign="right"/>
+		<view:Selector id="yaszd" code="SZD" hasBlank="true"  textAlign="left" width="85" blankCode="{blankCode}" change="getSjlx(event)" selectedID="{selectSzd}" param="type=city"/>
+		<s:Spacer width="3" height="0"/>
+		<s:Label id="sjlxLabel" width="60" styleName="head" text="事件类型" textAlign="right"/>
+		<s:ComboBox width="226" height="28" id="sjlx"  labelFunction="fieldTypeLabel" styleName="combo"  requireSelection="false" selectedIndex="{selectedSjlx}"  />
+		<s:Spacer width="2" height="0"/>
+		<s:Button width="75" height="28" label="预案匹配" click="yappFun(event)"/>
+	</s:HGroup>
+	<s:Scroller width="100%" height="100%"  >  
+		<s:Group id="imageGroup">
+			<s:Image id="image"  source="{YZ_SOURCE}"/>
+		</s:Group>
+	</s:Scroller>
+</s:TitleWindow>

BIN
gkaq/gis-flex/trunk/src/images/aqtc.png


BIN
gkaq/gis-flex/trunk/src/images/arrowLeft.png


BIN
gkaq/gis-flex/trunk/src/images/arrowRight.png


BIN
gkaq/gis-flex/trunk/src/images/map/clear1.png


BIN
gkaq/gis-flex/trunk/src/images/map/cxtj.png


BIN
gkaq/gis-flex/trunk/src/images/map/expert.png


BIN
gkaq/gis-flex/trunk/src/images/map/map.png


BIN
gkaq/gis-flex/trunk/src/images/map/pan.png


BIN
gkaq/gis-flex/trunk/src/images/map/satellite.png


BIN
gkaq/gis-flex/trunk/src/images/map/translation.png


BIN
gkaq/gis-flex/trunk/src/images/map/viewEntire.png


BIN
gkaq/gis-flex/trunk/src/images/map/yjcz.png


BIN
gkaq/gis-flex/trunk/src/images/map/zoomin.png


BIN
gkaq/gis-flex/trunk/src/images/map/zoomout.png


BIN
gkaq/gis-flex/trunk/src/images/maps32.png


BIN
gkaq/gis-flex/trunk/src/images/menu.jpg


BIN
gkaq/gis-flex/trunk/src/images/png/aq_bf.png


BIN
gkaq/gis-flex/trunk/src/images/png/aq_bw.png


BIN
gkaq/gis-flex/trunk/src/images/png/aq_expertMini.png


BIN
gkaq/gis-flex/trunk/src/images/png/aq_ga.png


BIN
gkaq/gis-flex/trunk/src/images/png/aq_gq.png


BIN
gkaq/gis-flex/trunk/src/images/png/aq_hb.png


BIN
gkaq/gis-flex/trunk/src/images/png/aq_jj.png


Some files were not shown because too many files changed in this diff