| | |
| | | <script> |
| | | var _framework = null; |
| | | var _AppEvent = null; |
| | | var locationObj = null |
| | | |
| | | function init(openId) { |
| | | if (openId && _AppEvent != null) { |
| | | showFun(openId); |
| | | return; |
| | | } |
| | | function getQueryStringByKey(key) { |
| | | return (document.location.search.match(new RegExp("(?:^\\?|&)" + key + "=(.*?)(?=&|$)")) || ['', null])[1]; |
| | | } |
| | | |
| | | function init(openId,locationObj) { |
| | | $.divselect("#divselect", "#inputselect"); |
| | | require(["base/framework", "base/AppEvent"], |
| | | function (framework, AppEvent) { |
| | |
| | | _framework.onSiderContainerShow(); |
| | | _framework.resize(); |
| | | _AppEvent = AppEvent; |
| | | _AppEvent.addAppEventListener("mapLoad", mapLoad); |
| | | |
| | | _AppEvent.addAppEventListener("mapLoad", function(map){ |
| | | if (locationObj && locationObj != null) { |
| | | map.centerAndZoom(new esri.geometry.Point(locationObj.x,locationObj.y, new esri.SpatialReference({ wkid: 4326 })), 14); |
| | | } |
| | | }); |
| | | |
| | | var openId = getQueryStringByKey('openid'); |
| | | if (openId) showFun(openId); |
| | | } |
| | | ); |
| | |
| | | _AppEvent.dispatchAppEvent(_AppEvent.RUN_WIDGET, id); |
| | | } |
| | | |
| | | function mapLoad(map) { |
| | | // if(locationObj) { |
| | | // map.centerAndZoom(new esri.geometry.Point(locationObj.x,locationObj.y, new esri.SpatialReference({ wkid: 4326 })), 14); |
| | | // } |
| | | } |
| | | |
| | | </script> |
| | | </head> |
| | | |
| | | <body onload="init()"> |
| | | <body> |
| | | |
| | | <div class="map_content"> |
| | | |
| | |
| | | </body> |
| | | <script src="./js/monitor.js"></script> |
| | | <script src="./js/forestry-map.js"></script> |
| | | |
| | | <script> |
| | | var openId = getQueryStringByKey('openid'); |
| | | if (openId && openId != '') { |
| | | init(openId) |
| | | } |
| | | |
| | | function getQueryStringByKey(key) { |
| | | return (document.location.search.match(new RegExp("(?:^\\?|&)" + key + "=(.*?)(?=&|$)")) || ['', null])[1]; |
| | | } |
| | | </script> |
| | | |
| | | </html> |