Przeglądaj źródła

git-svn-id: https://192.168.57.71/svn/qt@55 12fe181a-e57f-b044-8676-16dc139aa63e

ld_zhoutl 9 lat temu
rodzic
commit
9c22bc3477

+ 7 - 3
jdc/jdcweb/trunk/src/main/webapp/static/xt/js/ais/ship2.js

@@ -32,16 +32,20 @@ function closeShipWin() {
  * 查看船舶数据
  */
 function showShipInfo(mmsi,name) {
-    $.get($.ctx + "/ais/isJssjRange", {"mmsi": mmsi}, function (result) {
+    /*$.get($.ctx + "/ais/isJssjRange", {"mmsi": mmsi}, function (result) {
         if(result) {
             if(result.isRange == "Y") {
                 parent.singleShipMmsi = mmsi;
                 parent.singleShipFlg = true;
-                window.parent.initShipInfo(7);
+                window.parent.initShipInfo(11);
                 parent.layer.close(parent.srchShipWinIndex);
             } else {
                 $.messager.alert('提示',name+' 不在江苏省范围内!');
             }
         }
-    }, 'json');
+    }, 'json');*/
+	parent.singleShipMmsi = mmsi;
+    parent.singleShipFlg = true;
+    window.parent.initShipInfo(11);
+    parent.layer.close(parent.srchShipWinIndex);
 }

+ 3 - 2
jdc/jdcweb/trunk/src/main/webapp/static/xt/js/command/task.js

@@ -1044,7 +1044,7 @@ function dealShipHtml() {
  * 查看船舶数据
  */
 function showShipInfo(mmsi,name) {
-    $.get(basePath + "/ais/isJssjRange", {"mmsi": mmsi}, function (result) {
+    /*$.get(basePath + "/ais/isJssjRange", {"mmsi": mmsi}, function (result) {
         if(result) {
             if(result.isRange == "Y") {
                 parent.initShipInfoByMmsi(mmsi);
@@ -1052,8 +1052,9 @@ function showShipInfo(mmsi,name) {
                 $.messager.alert('提示', name+' 不在江苏省范围内!');
             }
         }
-    }, 'json');
+    }, 'json');*/
     //parent.parent.frames["headFrame"].changeTab("waterway", mmsi);
+	parent.initShipInfoByMmsi(mmsi);
 }
 
 /**

+ 18 - 11
jdc/jdcweb/trunk/src/main/webapp/static/xt/js/sys/basic_info.js

@@ -46,7 +46,22 @@ var selectFeature;
 var chuanboObj;
 var tempMarkerLayer;
 
-var base_url            = "http://10.1.30.111:8095/iserver/services/map-map/rest/maps/map";
+
+var base_url            = "http://10.1.30.111:8095/iserver/services/map-ugcv5-JSGIST2/rest/maps/JSGIST";
+var gk_url              = "http://10.1.30.111:8095/iserver/services/map-mongodb-JSGISTGK2/rest/maps/JSGIST-GK";
+var gk1_url             = "http://10.1.30.116:8090/iserver/services/map-gk/rest/maps/gist";
+var water_features_url = "http://10.1.30.116:8090/iserver/services/map-GKZY/rest/maps/GKZY";
+var img_base_url        = "http://10.1.30.111:8095/iserver/services/map-mongodb-JSGISTimage/rest/maps/JSGISTimage";
+var base_features_url   = "http://10.1.30.111:8191/iserver/services/map-rest-GZCX_map2/rest/maps/GZCX_map";
+var railway_city_url    = "http://10.1.30.111:8191/iserver/services/map-rest-GZCX_map2/rest/maps/JSCities";
+var railway_base_url    = "http://10.1.30.111:8095/iserver/services/map-mongodb-JSGISTGK2/rest/maps/JSGIST-GK";
+var railway_route_url    = "http://10.1.30.111:8095/iserver/services/map-mongodb-JSGISTTL/rest/maps/JSGIST-TL";
+// 江苏市界
+var sj_url =            "http://10.1.30.116:8090/iserver/services/data-GKZY/rest/data/datasources/GKZYData/datasets/L_SJ_PY";
+
+
+
+/*var base_url            = "http://10.1.30.111:8095/iserver/services/map-map/rest/maps/map";
 var gk_url              = "http://10.1.30.116:8090/iserver/services/map-gk/rest/maps/gist1";
 var gk1_url             = "http://10.1.30.116:8090/iserver/services/map-gk/rest/maps/gist";
 var water_features_url = "http://10.1.30.116:8090/iserver/services/map-GKZY/rest/maps/GKZY";
@@ -56,16 +71,8 @@ var railway_city_url    = "http://10.1.30.111:8191/iserver/services/map-rest-GZC
 var railway_base_url    = "http://10.1.30.111:8095/iserver/services/map-mongodb-JSGISTGK2/rest/maps/JSGIST-GK";
 var railway_route_url    = "http://10.1.30.116:8090/iserver/services/map-jstl2/rest/maps/jstl";
 // 江苏市界
-var sj_url =            "http://10.1.30.116:8090/iserver/services/data-GKZY/rest/data/datasources/GKZYData/datasets/L_SJ_PY";
+var sj_url =            "http://10.1.30.116:8090/iserver/services/data-GKZY/rest/data/datasources/GKZYData/datasets/L_SJ_PY";*/
 
-//var base_url = "http://192.168.57.83:8095/iserver/services/map-map/rest/maps/map";
-//var gk_url = "http://192.168.57.83:8090/iserver/services/map-gk/rest/maps/gist1";
-//var gk1_url = "http://192.168.57.83:8090/iserver/services/map-gk/rest/maps/gist";
-//var water_features_url = "http://192.168.57.83:8090/iserver/services/map-GKZY/rest/maps/GKZY";
-//var img_base_url = "http://192.168.57.83:8191/iserver/services/map-ugcv5-jshdimage/rest/maps/jshdimage";
-//var base_features_url = "http://192.168.57.83:8191/iserver/services/map-rest-GZCX_map2/rest/maps/GZCX_map";
-//var railway_city_url = "http://192.168.57.83:8191/iserver/services/map-rest-GZCX_map2/rest/maps/JSCities";
-//var sj_url =            "http://192.168.57.83:8090/iserver/services/data-GKZY/rest/data/datasources/GKZYData/datasets/L_SJ_PY";
 
 var lonOffset = 0.005232;
 var latOffset = 0.002236;
@@ -1416,7 +1423,7 @@ function getEvnetWinInfo(result) {
  */
 function addAisData(zoomIndex) {
     if(!zoomIndex) {
-        zoomIndex = 6;
+        zoomIndex = 10;
     }
     if (zoom >= zoomIndex) {
         var params = {

+ 3 - 2
jdc/jdcweb/trunk/src/main/webapp/static/xt/js/sys/common_air.js

@@ -312,6 +312,7 @@ function showAirPortList(result) {
  * @param type
  */
 function changemap(type){
+	var mapCenter = map.getCenter();
     if("1" == type) {
         $("#divMap").css("display","none");
         $("#divSatellite").css("display","block");
@@ -325,9 +326,9 @@ function changemap(type){
         airBaseLayer.setVisibility(false);
         airBaseLayer2.setVisibility(true);
         map.setBaseLayer(airBaseLayer2);
-        //map.setCenter(map.getCenter(), 3);
-        map.setCenter(new SuperMap.LonLat(119.7401215, 32.985849), 3);
+        //map.setCenter(new SuperMap.LonLat(119.7401215, 32.985849), 3);
     }
+    map.setCenter(mapCenter, map.getZoom());
 }
 
 /**

+ 18 - 15
jdc/jdcweb/trunk/src/main/webapp/static/xt/js/sys/common_command.js

@@ -353,7 +353,7 @@ function addWaterWayLayer() {
         cacheEnabled: true
     }, {maxResolution: "auto"});
     //监听图层信息加载完成事件
-    waterWayBaseLayer.events.on({"layerInitialized": addWaterWayLayer1});
+    waterWayBaseLayer.events.on({"layerInitialized": addCommdIntersection});
 }
 function addWaterWayLayer1() {
     //初始化水路图层2
@@ -656,10 +656,10 @@ function openCommandBasicInfoWin(objMarker) {
 function addCommdIntersection() {
     commdBaseLayer.isBaseLayer = true;
     waterWayBaseLayer.isBaseLayer = true;
-    waterWayBaseLayer2.isBaseLayer = true;
+//    waterWayBaseLayer2.isBaseLayer = true;
     map.addLayers([ commdBaseLayer, segmentLayer, intersectionLayer, selectMarkerLayer,
                     ljghSegmentLayer, ljghMarkerLayer, ljghResourcesLayer,
-                    waterWayBaseLayer, waterWayBaseLayer2, segmentWaterLayer]);
+                    waterWayBaseLayer, segmentWaterLayer]);
 
     // 显示地图范围
     map.setCenter(new SuperMap.LonLat(119.7401215, 32.985849), 4);
@@ -1202,7 +1202,7 @@ function changecmdmap(type){
         $("#divWaterway").css("display","block");
         commdBaseLayer.setVisibility(true);
         waterWayBaseLayer.setVisibility(false);
-        waterWayBaseLayer2.setVisibility(false);
+        //waterWayBaseLayer2.setVisibility(false);
         map.setBaseLayer(commdBaseLayer);
     } else if("2" == type) {
         $("#divMap").css("display","block");
@@ -1220,15 +1220,17 @@ function mapMoveChange() {
     displayWaterLayer();
     zoom = map.getZoom();
     if("2" == currMapType) {
-        if (zoom > 4) {
-            waterWayBaseLayer2.setVisibility(true);
-            waterWayBaseLayer.setVisibility(false);
-            map.setBaseLayer(waterWayBaseLayer2);
-        } else {
-            waterWayBaseLayer.setVisibility(true);
-            waterWayBaseLayer2.setVisibility(false);
-            map.setBaseLayer(waterWayBaseLayer);
-        }
+//        if (zoom > 4) {
+//            waterWayBaseLayer2.setVisibility(true);
+//            waterWayBaseLayer.setVisibility(false);
+//            map.setBaseLayer(waterWayBaseLayer2);
+//        } else {
+//            waterWayBaseLayer.setVisibility(true);
+//            waterWayBaseLayer2.setVisibility(false);
+//            map.setBaseLayer(waterWayBaseLayer);
+//        }
+    	waterWayBaseLayer.setVisibility(true);
+        map.setBaseLayer(waterWayBaseLayer);
         addAisData(10);
     }
     //map.setCenter(map.getCenter(), 1);
@@ -1992,7 +1994,7 @@ function jtgjShowHbxx(hbh) {
  * 查看船舶数据
  */
 function jtgjShowShipInfo(mmsi,name) {
-    $.get(basePath + "/ais/isJssjRange", {"mmsi": mmsi}, function (result) {
+    /*$.get(basePath + "/ais/isJssjRange", {"mmsi": mmsi}, function (result) {
         if(result) {
             if(result.isRange == "Y") {
                 initShipInfoByMmsi(mmsi);
@@ -2000,7 +2002,8 @@ function jtgjShowShipInfo(mmsi,name) {
                 layer.alert(name+' 不在江苏省范围内!', {icon: 0});
             }
         }
-    }, 'json');
+    }, 'json');*/
+	initShipInfoByMmsi(mmsi);
 }
 /**
  * 查看公路路线

+ 6 - 6
jdc/jdcweb/trunk/src/main/webapp/static/xt/js/sys/common_railway.js

@@ -92,7 +92,7 @@ function initRailMap() {
         ], allOverlays:true
     });
     //初始化图层
-    railBaseLayer = new SuperMap.Layer.TiledDynamicRESTLayer("底图", base_url, {
+    railBaseLayer = new SuperMap.Layer.TiledDynamicRESTLayer("底图", railway_route_url, {
         transparent: true,
         cacheEnabled: true
     }, {maxResolution: "auto"});
@@ -104,23 +104,23 @@ function initRailMap() {
     //监听图层信息加载完成事件
 
 
-    railBaseLayer.events.on({"layerInitialized": addRailLayer1});
+    railBaseLayer.events.on({"layerInitialized": addRailLayer});
 
 }
 
-function addRailLayer1() {
+/*function addRailLayer1() {
     //初始化图层
     railBaseLayer2 = new SuperMap.Layer.TiledDynamicRESTLayer("底图2", railway_route_url, {
         transparent: true,
         cacheEnabled: true
     });
     railBaseLayer2.events.on({"layerInitialized": addRailLayer});
-}
+}*/
 
 function addRailLayer() {
     railBaseLayer.isBaseLayer = true;
-    railBaseLayer2.isBaseLayer = true;
-    map.addLayers([railBaseLayer, railBaseLayer2]);
+//    railBaseLayer2.isBaseLayer = true;
+    map.addLayers([railBaseLayer]);
 
     //显示地图范围
     map.setCenter(new SuperMap.LonLat(119.7401215, 32.985849),4);

+ 19 - 19
jdc/jdcweb/trunk/src/main/webapp/static/xt/js/sys/common_waterway.js

@@ -12,7 +12,7 @@ var airWayFeatures = [];
 
 /** 页面初始化 */
 $(function () {
-    initWaterWayMap(gk_url);
+    initWaterWayMap();
     initWaterWay();
     style = {
         strokeColor: "#304DBE",
@@ -101,7 +101,7 @@ function initWaterWay() {
     /**
      * 每10秒查询船舶动态信息
      */
-    setInterval("addAisData(6)", 10000);
+    setInterval("addAisData(10)", 10000);
     addGangQULayer();
     addMaTouLayer();
     //addBoWeiLayer();
@@ -154,7 +154,7 @@ function getWaterWayLayerItems(basicType) {
  *初始化地图
  *
  */
-function initWaterWayMap(baseUrl) {
+function initWaterWayMap() {
     /**
      * 初始化地图
      * @type {SuperMap.Map}
@@ -167,12 +167,12 @@ function initWaterWayMap(baseUrl) {
         ]
     });
     //初始化图层
-    waterWayBaseLayer = new SuperMap.Layer.TiledDynamicRESTLayer("底图", baseUrl, {
+    waterWayBaseLayer = new SuperMap.Layer.TiledDynamicRESTLayer("底图", gk_url, {
         transparent: true,
         cacheEnabled: true
     }, {maxResolution: "auto"});
     //监听图层信息加载完成事件
-    waterWayBaseLayer.events.on({"layerInitialized": addWaterWayLayer1});
+    waterWayBaseLayer.events.on({"layerInitialized": addWaterWayLayer});
     
     // 船舶轨迹图层
     segmentWaterLayer = new SuperMap.Layer.Vector("船舶轨迹"); // 船舶
@@ -193,11 +193,11 @@ function addWaterWayLayer1() {
 
 function addWaterWayLayer() {
     waterWayBaseLayer.isBaseLayer = true;
-    waterWayBaseLayer2.isBaseLayer = true;
-    map.addLayers([waterWayBaseLayer, waterWayBaseLayer2, segmentWaterLayer]);
+    //waterWayBaseLayer2.isBaseLayer = true;
+    map.addLayers([waterWayBaseLayer, segmentWaterLayer]);
 
     //显示地图范围
-    map.setCenter(new SuperMap.LonLat(119.7401215, 32.985849), 0);
+    map.setCenter(new SuperMap.LonLat(119.7401215, 32.985849), 4);
 }
 
 /**
@@ -224,7 +224,7 @@ function initWaterWayBasicInfoEvent(name, basicType) {
     }  else if (name == "chuanbo") {
         singleShipFlg = false; 
         singleShipMmsi =""; 
-        addAisData(6);
+        addAisData(10);
     } else {
         $.get(basePath + "/basicInfo", {type: name}, function (result) {
             var len = result.length;
@@ -327,16 +327,16 @@ function mapMoveChange() {
     // 当地图movechange后,水路Vertor层重新设置
     displayWaterLayer();
     zoom = map.getZoom();
-    if (zoom >= 2) {
-        waterWayBaseLayer.setVisibility(false);
-        waterWayBaseLayer2.setVisibility(true);
-        map.setBaseLayer(waterWayBaseLayer2);
-    } else {
-        waterWayBaseLayer.setVisibility(true);
-        waterWayBaseLayer2.setVisibility(false);
-        map.setBaseLayer(waterWayBaseLayer);
-    }
-    addAisData(6);
+//    if (zoom >= 2) {
+//        waterWayBaseLayer.setVisibility(false);
+//        waterWayBaseLayer2.setVisibility(true);
+//        map.setBaseLayer(waterWayBaseLayer2);
+//    } else {
+//        waterWayBaseLayer.setVisibility(true);
+//        waterWayBaseLayer2.setVisibility(false);
+//        map.setBaseLayer(waterWayBaseLayer);
+//    }
+    addAisData(10);
 }