南昌市物联网技防平台-前端
shuishen
2021-04-08 a4e06ccd3cd976fbe4eef99e188d42ec9f3ad054
public/map/index.html
@@ -6,9 +6,9 @@
  <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  <title>Document</title>
  <link rel="stylesheet" type="text/css"
    href="http://36.134.81.48:18001/arcgis_js_v318_api/arcgis_js_api/library/3.18/3.18/dijit/themes/tundra/tundra.css" />
    href="https://web.byisf.com/arcgis_js_v318_api/arcgis_js_api/library/3.18/3.18/dijit/themes/tundra/tundra.css" />
  <link rel="stylesheet" type="text/css"
    href="http://36.134.81.48:18001/arcgis_js_v318_api/arcgis_js_api/library/3.18/3.18/esri/css/esri.css" />
    href="https://web.byisf.com/arcgis_js_v318_api/arcgis_js_api/library/3.18/3.18/esri/css/esri.css" />
  <link rel="stylesheet" href="./lib/layui/css/layui.css" />
  <link rel="stylesheet" href="./css/forestry-map.css" />
  <link type="text/css" rel="stylesheet" href="framework.css" />
@@ -29,7 +29,7 @@
  <script src="env.js"></script>
  <script type="text/javascript"
    src="http://36.134.81.48:18001/arcgis_js_v318_api/arcgis_js_api/library/3.18/3.18/init.js"></script>
    src="https://web.byisf.com/arcgis_js_v318_api/arcgis_js_api/library/3.18/3.18/init.js"></script>
  <script src='./lib/zTree_v3/js/jquery.ztree.all.js'></script>
  <script>
    var _framework = null;
@@ -38,9 +38,13 @@
    function getQueryStringByKey(key) {
      return (document.location.search.match(new RegExp("(?:^\\?|&)" + key + "=(.*?)(?=&|$)")) || ['', null])[1];
    }
    var ISinit = getQueryStringByKey('ISinit');
    var openId = getQueryStringByKey('openid');
    if(ISinit == null){
      init(openId,null);
    }
    function init(openId,locationObj) {
      $.divselect("#divselect", "#inputselect");
      require(["base/framework", "base/AppEvent"],
        function (framework, AppEvent) {
          _framework = new framework();
@@ -50,11 +54,9 @@
          _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);
              map.centerAndZoom(new esri.geometry.Point(locationObj.x,locationObj.y, new esri.SpatialReference({ wkid: 4326 })), 16);
            }
          });
          var openId = getQueryStringByKey('openid');
          if (openId) showFun(openId);
        }
      );