qinbo
2021-09-26 18e1ebbf52aff6284869c634d14f77ed250272d1
 change  layer add time
3个文件已修改
605 ■■■■■ 已修改文件
js/function.js 561 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
widgets/manageLayers_style/view.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
widgetsTS/dataTime/widget.js 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
js/function.js
@@ -49,21 +49,31 @@
    (day > 9 ? day : ("0" + day)) + " " +
    (hours > 9 ? hours : ("0" + hours)) + ":00:00";
}
console.log(mars3d.globel_variables);
mars3d.globel_variables = { geoserver_url_predix: 'http://58.246.27.194:7011/', userid: 2, queryDataType: 'hour' };
mars3d.globel_variables.queryDataTStart = getDefaultDateTime();
mars3d.globel_variables.queryDataTEnd = getDefaultDateTime();
mars3d.globel_variables.layer100600_conifg = { name: '街道', styleoptions: ['pm25', 'pm10'], selectedstyle: 'pm25' };
console.log(mars3d.globel_variables);
// console.log(mars3d.global_variables);
mars3d.global_variables = { geoserver_url_predix: 'http://58.246.27.194:7011/', userid: 2, queryDataType: 'hour' };
mars3d.global_variables.queryDataTStart = getDefaultDateTime();
mars3d.global_variables.queryDataTEnd = getDefaultDateTime();
  mars3d.global_variables.layer1001_conifg={name:'国控点',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
  mars3d.global_variables.layer1002_conifg={name:'微站',styleoptions:['pm25','pm10','no','no2','nox','co','p_01'],selectedstyle:'pm25',show:false};
  mars3d.global_variables.layer1003_conifg={name:'监测点',styleoptions:['p_01'],selectedstyle:'p_01',show:false};
  mars3d.global_variables.layer1005_conifg={name:'上海市道路',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
  mars3d.global_variables.layer100600_conifg={name:'机场',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
  mars3d.global_variables.layer100601_conifg={name:'码头',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
  mars3d.global_variables.layer100602_conifg={name:'环线',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
  mars3d.global_variables.layer100603_conifg={name:'工业园区',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
  mars3d.global_variables.layer100604_conifg={name:'进博会',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
  mars3d.global_variables.layer100605_conifg={name:'边界',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
  mars3d.global_variables.layer100607_conifg={name:'宝山圈',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
  mars3d.global_variables.layer100610_conifg={name:'行政区',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
  mars3d.global_variables.layer100611_conifg={name:'街道',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
  mars3d.global_variables.layer1000_conifg={name:'网格图层1000',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
  mars3d.global_variables.layer5000_conifg={name:'网格图层5000',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
mars3d.reloadLayers = function (layerid){
  if (layerid ==100611) {
    addJiedaoLayer();
  }
};
// mars3d.reloadLayers = function (layerid){
//   if (layerid == 100611) {
//     addJiedaoLayer();
//   }
// };
function addTDTAnnoLayer() {
@@ -88,11 +98,27 @@
function addguokongLayers(datatime) {
  let Layer = map.getLayerById(1001);
  if (Layer) {
    mars3d.global_variables.layer1002_conifg.show = Layer.options.show;
    map.removeLayer(Layer, true);
    Layer = null;
  };
  layer_1001_guokong = new mars3d.layer.DivLayer({
    name: '国控点',
    id:1001,
    name: mars3d.global_variables.layer1001_conifg.name,
    pid: 99, //图层管理 中使用,父节点id
    selectedMapStyleOptions: 'pm25',
    hasMapStyleOptions: ['pm25', 'pm10', 'no', 'no2', 'nox', 'co']
    selectedMapStyleOptions: mars3d.global_variables.layer1001_conifg.selectedstyle,
    hasMapStyleOptions: mars3d.global_variables.layer1001_conifg.styleoptions,
    show:mars3d.global_variables.layer1001_conifg.show,
    reloadLayers:function(new_style){
      console.log(new_style);
      console.log(mars3d.global_variables.layer1001_conifg.show);
      mars3d.global_variables.layer1001_conifg.selectedstyle = new_style;
      addguokongLayers();
    }
  });
  map.addLayer(layer_1001_guokong);
@@ -129,7 +155,7 @@
  // add 国控点
  $.getJSON("http://58.246.27.194:7012/dataapi/Bdata?bid=get_1001_list_hour&datatime=2021-09-06%2012:00:00&qindex=pm25", (result) => {
  $.getJSON("http://58.246.27.194:7012/dataapi/Bdata?bid=get_1001_list_"+mars3d.global_variables.queryDataType+"&datatime="+mars3d.global_variables.queryDataTStart+"&qindex="+mars3d.global_variables.layer1001_conifg.selectedstyle, (result) => {
    var pointColorArr = ["#f33349", "#fff000", "#33347f"];
    for (var i = 0, len = result.data.result.length; i < len; i++) {
      var item = result.data.result[i];
@@ -165,21 +191,30 @@
function addWeizhanLayer() {
  let Layer = map.getLayerById(1002);
  if (Layer) {
    mars3d.global_variables.layer1002_conifg.show = Layer.options.show;
    map.removeLayer(Layer, true);
    Layer = null;
  };
  //方式2:在创建地球后调用addLayer添加图层(直接new对应type类型的图层类)
  layer_1002_weizhan = new mars3d.layer.WmsLayer({
    id:1002,
    pid: 99,
    name: "微站",
    name: mars3d.global_variables.layer1002_conifg.name,
    type: "wms",
    url: "http://58.246.27.194:7011/geoserver/konglu_58/wms",
    layers: "konglu_58:vis_weizhan_hour",
    url: mars3d.global_variables.geoserver_url_predix+"/geoserver/konglu_58/wms",
    layers: "konglu_58:vis_weizhan_"+mars3d.global_variables.queryDataType,
    crs: "EPSG:4326",
    parameters: {
      "Styles": "point_weizhan_pm25",
      "styles": "point_weizhan_"+mars3d.global_variables.layer1002_conifg.selectedstyle,
      "transparent": "true",
      "format": "image/png",
      "sld": "http://127.0.0.1:8080/geoserver/styles/point_weizhan_pm25.sld"
      "viewparams": "userid:" + mars3d.global_variables.userid + ";datatime:" + mars3d.global_variables.queryDataTStart
    },
    center: { "lat": 30.429987, "lng": 121.590473, "alt": 58635, "heading": 359, "pitch": -40 },
    // center: { "lat": 30.429987, "lng": 121.590473, "alt": 58635, "heading": 359, "pitch": -40 },
    getFeatureInfoParameters: {
      feature_count: 10
    },
@@ -195,11 +230,18 @@
      }),
    },
    popup: "all",
    show: false,
    selectedMapStyleOptions: 'pm25',
    hasMapStyleOptions: ['pm25', 'pm10', 'no', 'no2', 'nox', 'co'],
    flyTo: true
    show: mars3d.global_variables.layer1002_conifg.show,
    selectedMapStyleOptions: mars3d.global_variables.layer1002_conifg.selectedstyle,
    hasMapStyleOptions: mars3d.global_variables.layer1002_conifg.styleoptions,
    flyTo: false,
    reloadLayers:function(new_style){
      console.log(new_style);
      console.log(mars3d.global_variables.layer1002_conifg.show);
      mars3d.global_variables.layer1002_conifg.selectedstyle = new_style;
      addWeizhanLayer();
    }
  });
  //单击事件
  layer_1002_weizhan.on(mars3d.EventType.click, function (event) {
@@ -212,21 +254,31 @@
function addJianceLayer() {
  let Layer = map.getLayerById(1003);
  if (Layer) {
    mars3d.global_variables.layer1002_conifg.show = Layer.options.show;
    map.removeLayer(Layer, true);
    Layer = null;
  };
  //方式2:在创建地球后调用addLayer添加图层(直接new对应type类型的图层类)
  layer_1003_jiance = new mars3d.layer.WmsLayer({
    id:1003,
    pid: 99,
    name: "监测点",
    name: mars3d.global_variables.layer1003_conifg.name,
    type: "wms",
    url: "http://58.246.27.194:7011/geoserver/konglu_58/wms",
    layers: "konglu_58:vis_weizhan_hour",
    url: mars3d.global_variables.geoserver_url_predix+"/geoserver/konglu_58/wms",
    layers: "konglu_58:vis_weizhan_"+mars3d.global_variables.queryDataType,
    crs: "EPSG:4326",
    parameters: {
      "Styles": "point_weizhan_pm25",
      "Styles": "point_jiance_"+mars3d.global_variables.layer1003_conifg.selectedstyle,
      "transparent": "true",
      "format": "image/png",
      "sld": "http://127.0.0.1:8080/geoserver/styles/point_weizhan_pm25.sld"
      "viewparams": "userid:" + mars3d.global_variables.userid + ";datatime:" + mars3d.global_variables.queryDataTStart
    },
    center: { "lat": 30.429987, "lng": 121.590473, "alt": 58635, "heading": 359, "pitch": -40 },
    // center: { "lat": 30.429987, "lng": 121.590473, "alt": 58635, "heading": 359, "pitch": -40 },
    getFeatureInfoParameters: {
      feature_count: 10
    },
@@ -242,10 +294,16 @@
      }),
    },
    popup: "all",
    show: false,
    selectedMapStyleOptions: 'pm25',
    hasMapStyleOptions: ['pm25', 'pm10', 'no', 'no2', 'nox', 'co'],
    flyTo: true
    show: mars3d.global_variables.layer1003_conifg.show,
    selectedMapStyleOptions: mars3d.global_variables.layer1003_conifg.selectedstyle,
    hasMapStyleOptions: mars3d.global_variables.layer1003_conifg.styleoptions,
    flyTo: false,
    reloadLayers:function(new_style){
      console.log(new_style);
      console.log(mars3d.global_variables.layer1003_conifg.show);
      mars3d.global_variables.layer1003_conifg.selectedstyle = new_style;
      addJianceLayer();
    }
  });
  //单击事件
@@ -260,21 +318,31 @@
function addRoadLayer() {
  let Layer = map.getLayerById(1005);
  if (Layer) {
    mars3d.global_variables.layer1002_conifg.show = Layer.options.show;
    map.removeLayer(Layer, true);
    Layer = null;
  };
  //方式2:在创建地球后调用addLayer添加图层(直接new对应type类型的图层类)
  layer_1005_roadsection = new mars3d.layer.WmsLayer({
    id:1005,
    pid: 99,
    name: "上海市道路",
    name:mars3d.global_variables.layer1005_conifg.name,
    type: "wms",
    url: "http://58.246.27.194:7011/geoserver/konglu_58/wms",
    layers: "konglu_58:vis_roadsection_hour",
    url: mars3d.global_variables.geoserver_url_predix+"geoserver/konglu_58/wms",
    layers: "konglu_58:vis_roadsection_"+mars3d.global_variables.queryDataType,
    crs: "EPSG:4326",
    parameters: {
      "Stayle": "polyline_road_pm25",
      "Styles": "polyline_road_"+mars3d.global_variables.layer1005_conifg.selectedstyle,
      "transparent": "true",
      "format": "image/png",
      "sld": "http://127.0.0.1:8080/geoserver/styles/polyline_road_pm25.sld"
      "viewparams": "userid:" + mars3d.global_variables.userid + ";datatime:" + mars3d.global_variables.queryDataTStart
    },
    center: { "lat": 30.487351, "lng": 121.613269, "alt": 54033, "heading": 359, "pitch": -40 },
    // center: { "lat": 30.487351, "lng": 121.613269, "alt": 54033, "heading": 359, "pitch": -40 },
    getFeatureInfoParameters: {
      feature_count: 10
    },
@@ -290,10 +358,16 @@
      }),
    },
    popup: "all",
    show: false,
    selectedMapStyleOptions: 'pm25',
    hasMapStyleOptions: ['pm25', 'pm10', 'no', 'no2', 'nox', 'co'],
    flyTo: true
    show: mars3d.global_variables.layer1005_conifg.show,
    selectedMapStyleOptions: mars3d.global_variables.layer1005_conifg.selectedstyle,
    hasMapStyleOptions: mars3d.global_variables.layer1005_conifg.styleoptions,
    flyTo: false,
    reloadLayers:function(new_style){
      console.log(new_style);
      console.log(mars3d.global_variables.layer1005_conifg.show);
      mars3d.global_variables.layer1005_conifg.selectedstyle = new_style;
      addRoadLayer();
    }
  });
  //单击事件
@@ -309,21 +383,31 @@
function addJichangLayer() {
  let Layer = map.getLayerById(100600);
  if (Layer) {
    mars3d.global_variables.layer1002_conifg.show = Layer.options.show;
    map.removeLayer(Layer, true);
    Layer = null;
  };
  //方式2:在创建地球后调用addLayer添加图层(直接new对应type类型的图层类)
  layer_100600_jichang = new mars3d.layer.WmsLayer({
    // id : 10,
    id:100600,
    pid: 1006,
    name: "机场",
    name:mars3d.global_variables.layer100600_conifg.name,
    type: "wms",
    url: "http://58.246.27.194:7011/geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100600_hour",
    url: mars3d.global_variables.geoserver_url_predix+"geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100600_"+mars3d.global_variables.queryDataType,
    crs: "EPSG:4326",
    parameters: {
      "styles": "polygon_region_"+mars3d.global_variables.layer1005_conifg.selectedstyle,
      "transparent": "true",
      "format": "image/png",
      "sld": "http://127.0.0.1:8080/geoserver/styles/polygon_region_co.sld"
      "viewparams": "userid:" + mars3d.global_variables.userid + ";datatime:" + mars3d.global_variables.queryDataTStart
    },
    center: { "lat": 30.756467, "lng": 121.614552, "alt": 73242, "heading": 360, "pitch": -56 },
    // center: { "lat": 30.756467, "lng": 121.614552, "alt": 73242, "heading": 360, "pitch": -56 },
    getFeatureInfoParameters: {
      feature_count: 10
    },
@@ -339,10 +423,16 @@
      }),
    },
    popup: "all",
    show: false,
    selectedMapStyleOptions: 'pm25',
    hasMapStyleOptions: ['pm25', 'pm10', 'no', 'no2', 'nox', 'co'],
    flyTo: true
    show: mars3d.global_variables.layer100600_conifg.show,
    selectedMapStyleOptions:mars3d.global_variables.layer100600_conifg.selectedstyle,
    hasMapStyleOptions: mars3d.global_variables.layer100600_conifg.styleoptions,
    flyTo: false,
    reloadLayers:function(new_style){
      console.log(new_style);
      console.log(mars3d.global_variables.layer100600_conifg.show);
      mars3d.global_variables.layer100600_conifg.selectedstyle = new_style;
      addJichangLayer();
    }
  });
  //单击事件
@@ -356,21 +446,31 @@
function addMatouLayer() {
  let Layer = map.getLayerById(100601);
  if (Layer) {
    mars3d.global_variables.layer1002_conifg.show = Layer.options.show;
    map.removeLayer(Layer, true);
    Layer = null;
  };
  //方式2:在创建地球后调用addLayer添加图层(直接new对应type类型的图层类)
  layer_100601_matou = new mars3d.layer.WmsLayer({
    // id : 10,
    id:100601,
    pid: 1006,
    name: "码头",
    name: mars3d.global_variables.layer100601_conifg.name,
    type: "wms",
    url: "http://58.246.27.194:7011/geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100601_hour",
    url: mars3d.global_variables.geoserver_url_predix+"geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100601_"+mars3d.global_variables.queryDataType,
    crs: "EPSG:4326",
    parameters: {
      "Styles": "polygon_region_"+mars3d.global_variables.layer100601_conifg.selectedstyle,
      "transparent": "true",
      "format": "image/png",
      "sld": "http://127.0.0.1:8080/geoserver/styles/polygon_region_co.sld"
      "viewparams": "userid:" + mars3d.global_variables.userid + ";datatime:" + mars3d.global_variables.queryDataTStart
    },
    center: { "lat": 30.577234, "lng": 121.664644, "alt": 84121, "heading": 360, "pitch": -56 },
    // center: { "lat": 30.577234, "lng": 121.664644, "alt": 84121, "heading": 360, "pitch": -56 },
    getFeatureInfoParameters: {
      feature_count: 10
    },
@@ -386,10 +486,16 @@
      }),
    },
    popup: "all",
    show: false,
    selectedMapStyleOptions: 'pm25',
    hasMapStyleOptions: ['pm25', 'pm10', 'no', 'no2', 'nox', 'co'],
    flyTo: true
    show: mars3d.global_variables.layer100601_conifg.show,
    selectedMapStyleOptions: mars3d.global_variables.layer100601_conifg.selectedstyle,
    hasMapStyleOptions: mars3d.global_variables.layer100601_conifg.styleoptions,
    flyTo: false,
    reloadLayers:function(new_style){
      console.log(new_style);
      console.log(mars3d.global_variables.layer100601_conifg.show);
      mars3d.global_variables.layer100601_conifg.selectedstyle = new_style;
      addMatouLayer();
    }
  });
  //单击事件
@@ -403,21 +509,31 @@
function addHuanxianLayer() {
  let Layer = map.getLayerById(100602);
  if (Layer) {
    mars3d.global_variables.layer1002_conifg.show = Layer.options.show;
    map.removeLayer(Layer, true);
    Layer = null;
  };
  //方式2:在创建地球后调用addLayer添加图层(直接new对应type类型的图层类)
  layer_100602_huanxian = new mars3d.layer.WmsLayer({
    // id : 10,
    id:100602,
    pid: 1006,
    name: "环线",
    name: mars3d.global_variables.layer100602_conifg.name,
    type: "wms",
    url: "http://58.246.27.194:7011/geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100602_hour",
    url: mars3d.global_variables.geoserver_url_predix+"geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100602_"+mars3d.global_variables.queryDataType,
    crs: "EPSG:4326",
    parameters: {
      "Styles": "polygon_region_"+mars3d.global_variables.layer100602_conifg.selectedstyle,
      "transparent": "true",
      "format": "image/png",
      "sld": "http://127.0.0.1:8080/geoserver/styles/polygon_region_co.sld"
      "viewparams": "userid:" + mars3d.global_variables.userid + ";datatime:" + mars3d.global_variables.queryDataTStart
    },
    center: { "lat": 30.687288, "lng": 121.623785, "alt": 88144, "heading": 360, "pitch": -56 },
    // center: { "lat": 30.687288, "lng": 121.623785, "alt": 88144, "heading": 360, "pitch": -56 },
    getFeatureInfoParameters: {
      feature_count: 10
    },
@@ -433,10 +549,16 @@
      }),
    },
    popup: "all",
    show: false,
    selectedMapStyleOptions: 'pm25',
    hasMapStyleOptions: ['pm25', 'pm10', 'no', 'no2', 'nox', 'co'],
    flyTo: true
    show: mars3d.global_variables.layer100602_conifg.show,
    selectedMapStyleOptions: mars3d.global_variables.layer100602_conifg.selectedstyle,
    hasMapStyleOptions:mars3d.global_variables.layer100602_conifg.styleoptions,
    flyTo: false,
    reloadLayers:function(new_style){
      console.log(new_style);
      console.log(mars3d.global_variables.layer100602_conifg.show);
      mars3d.global_variables.layer100602_conifg.selectedstyle = new_style;
      addHuanxianLayer();
    }
  });
  //单击事件
@@ -451,21 +573,31 @@
function addYuanyuLayer() {
  let Layer = map.getLayerById(100603);
  if (Layer) {
    mars3d.global_variables.layer1002_conifg.show = Layer.options.show;
    map.removeLayer(Layer, true);
    Layer = null;
  };
  //方式2:在创建地球后调用addLayer添加图层(直接new对应type类型的图层类)
  layer_100603_yuanqu = new mars3d.layer.WmsLayer({
    // id : 10,
    id:100603,
    pid: 1006,
    name: "工业园区",
    name: mars3d.global_variables.layer100603_conifg.name,
    type: "wms",
    url: "http://58.246.27.194:7011/geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100603_hour",
    url: mars3d.global_variables.geoserver_url_predix+"geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100603_"+mars3d.global_variables.queryDataType,
    crs: "EPSG:4326",
    parameters: {
      "styles":"polygon_region_"+mars3d.global_variables.layer100603_conifg.selectedstyle,
      "transparent": "true",
      "format": "image/png",
      "sld": "http://127.0.0.1:8080/geoserver/styles/polygon_region_co.sld"
      "viewparams": "userid:" + mars3d.global_variables.userid + ";datatime:" + mars3d.global_variables.queryDataTStart
    },
    center: { "lat": 30.393398, "lng": 121.534777, "alt": 91038, "heading": 360, "pitch": -56 },
    // center: { "lat": 30.393398, "lng": 121.534777, "alt": 91038, "heading": 360, "pitch": -56 },
    getFeatureInfoParameters: {
      feature_count: 10
    },
@@ -481,10 +613,16 @@
      }),
    },
    popup: "all",
    show: false,
    selectedMapStyleOptions: 'pm25',
    hasMapStyleOptions: ['pm25', 'pm10', 'no', 'no2', 'nox', 'co'],
    flyTo: true
    show: mars3d.global_variables.layer100603_conifg.show,
    selectedMapStyleOptions: mars3d.global_variables.layer100603_conifg.selectedstyle,
    hasMapStyleOptions: mars3d.global_variables.layer100603_conifg.styleoptions,
    flyTo: false,
    reloadLayers:function(new_style){
      console.log(new_style);
      console.log(mars3d.global_variables.layer100603_conifg.show);
      mars3d.global_variables.layer100603_conifg.selectedstyle = new_style;
      addYuanyuLayer();
    }
  });
  //单击事件
@@ -498,21 +636,31 @@
function addJinboLayer() {
  let Layer = map.getLayerById(100604);
  if (Layer) {
    mars3d.global_variables.layer1002_conifg.show = Layer.options.show;
    map.removeLayer(Layer, true);
    Layer = null;
  };
  //方式2:在创建地球后调用addLayer添加图层(直接new对应type类型的图层类)
  layer_100604_jinbo = new mars3d.layer.WmsLayer({
    // id : 10,
    id:100604,
    pid: 1006,
    name: "进博会",
    name: mars3d.global_variables.layer100604_conifg.name,
    type: "wms",
    url: "http://58.246.27.194:7011/geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100604_hour",
    url: mars3d.global_variables.geoserver_url_predix+"geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100604_"+mars3d.global_variables.queryDataType,
    crs: "EPSG:4326",
    parameters: {
      "styles":"polygon_region_"+mars3d.global_variables.layer100604_conifg.selectedstyle,
      "transparent": "true",
      "format": "image/png",
      "sld": "http://127.0.0.1:8080/geoserver/styles/polygon_region_co.sld"
      "viewparams": "userid:" + mars3d.global_variables.userid + ";datatime:" + mars3d.global_variables.queryDataTStart
    },
    center: { "lat": 30.839605, "lng": 121.372945, "alt": 52000, "heading": 360, "pitch": -56 },
    // center: { "lat": 30.839605, "lng": 121.372945, "alt": 52000, "heading": 360, "pitch": -56 },
    getFeatureInfoParameters: {
      feature_count: 10
    },
@@ -528,10 +676,16 @@
      }),
    },
    popup: "all",
    show: false,
    selectedMapStyleOptions: 'pm25',
    hasMapStyleOptions: ['pm25', 'pm10', 'no', 'no2', 'nox', 'co'],
    flyTo: true
    show: mars3d.global_variables.layer100604_conifg.show,
    selectedMapStyleOptions:mars3d.global_variables.layer100604_conifg.selectedstyle,
    hasMapStyleOptions:mars3d.global_variables.layer100604_conifg.styleoptions,
    flyTo: false,
    reloadLayers:function(new_style){
      console.log(new_style);
      console.log(mars3d.global_variables.layer100604_conifg.show);
      mars3d.global_variables.layer100604_conifg.selectedstyle = new_style;
      addJinboLayer();
    }
  });
  //单击事件
@@ -545,21 +699,31 @@
function addBianjieLayer() {
  let Layer = map.getLayerById(100605);
  if (Layer) {
    mars3d.global_variables.layer1002_conifg.show = Layer.options.show;
    map.removeLayer(Layer, true);
    Layer = null;
  };
  //方式2:在创建地球后调用addLayer添加图层(直接new对应type类型的图层类)
  layer_100605_bianjie = new mars3d.layer.WmsLayer({
    // id : 10,
    id:100605,
    pid: 1006,
    name: "边界",
    name: mars3d.global_variables.layer100605_conifg.name,
    type: "wms",
    url: "http://58.246.27.194:7011/geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100605_hour",
    url: mars3d.global_variables.geoserver_url_predix+"geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100605_"+mars3d.global_variables.queryDataType,
    crs: "EPSG:4326",
    parameters: {
      "styles":"polygon_region_"+mars3d.global_variables.layer100605_conifg.selectedstyle,
      "transparent": "true",
      "format": "image/png",
      "sld": "http://127.0.0.1:8080/geoserver/styles/polygon_region_co.sld"
      "viewparams": "userid:" + mars3d.global_variables.userid + ";datatime:" + mars3d.global_variables.queryDataTStart
    },
    center: { "lat": 30.880665, "lng": 121.305298, "alt": 69363, "heading": 360, "pitch": -56 },
    // center: { "lat": 30.880665, "lng": 121.305298, "alt": 69363, "heading": 360, "pitch": -56 },
    getFeatureInfoParameters: {
      feature_count: 10
    },
@@ -575,10 +739,16 @@
      }),
    },
    popup: "all",
    show: false,
    selectedMapStyleOptions: 'pm25',
    hasMapStyleOptions: ['pm25', 'pm10', 'no', 'no2', 'nox', 'co'],
    flyTo: true
    show: mars3d.global_variables.layer100605_conifg.show,
    selectedMapStyleOptions: mars3d.global_variables.layer100605_conifg.selectedstyle,
    hasMapStyleOptions: mars3d.global_variables.layer100605_conifg.styleoptions,
    flyTo: false,
    reloadLayers:function(new_style){
      console.log(new_style);
      console.log(mars3d.global_variables.layer100605_conifg.show);
      mars3d.global_variables.layer100605_conifg.selectedstyle = new_style;
      addBianjieLayer();
    }
  });
  //单击事件
@@ -592,21 +762,31 @@
function addQuanLayer() {
  let Layer = map.getLayerById(100607);
  if (Layer) {
    mars3d.global_variables.layer1002_conifg.show = Layer.options.show;
    map.removeLayer(Layer, true);
    Layer = null;
  };
  //方式2:在创建地球后调用addLayer添加图层(直接new对应type类型的图层类)
  layer_100607_quan = new mars3d.layer.WmsLayer({
    // id : 10,
    id:100607,
    pid: 1006,
    name: "宝山圈",
    name: mars3d.global_variables.layer100607_conifg.name,
    type: "wms",
    url: "http://58.246.27.194:7011/geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100607_hour",
    url:mars3d.global_variables.geoserver_url_predix +"geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100607_"+mars3d.global_variables.queryDataType,
    crs: "EPSG:4326",
    parameters: {
      "styles":"polygon_region_"+mars3d.global_variables.layer100607_conifg.selectedstyle,
      "transparent": "true",
      "format": "image/png",
      "sld": "http://127.0.0.1:8080/geoserver/styles/polygon_region_co.sld"
      "viewparams": "userid:" + mars3d.global_variables.userid + ";datatime:" + mars3d.global_variables.queryDataTStart
    },
    center: { "lat": 30.736361, "lng": 121.566128, "alt": 83811, "heading": 360, "pitch": -56 },
    // center: { "lat": 30.736361, "lng": 121.566128, "alt": 83811, "heading": 360, "pitch": -56 },
    getFeatureInfoParameters: {
      feature_count: 10
    },
@@ -622,10 +802,16 @@
      }),
    },
    popup: "all",
    show: false,
    selectedMapStyleOptions: 'pm25',
    hasMapStyleOptions: ['pm25', 'pm10', 'no', 'no2', 'nox', 'co'],
    flyTo: true
    show: mars3d.global_variables.layer100607_conifg.show,
    selectedMapStyleOptions: mars3d.global_variables.layer100607_conifg.selectedstyle,
    hasMapStyleOptions: mars3d.global_variables.layer100607_conifg.styleoptions,
    flyTo: false,
    reloadLayers:function(new_style){
      console.log(new_style);
      console.log(mars3d.global_variables.layer100607_conifg.show);
      mars3d.global_variables.layer100607_conifg.selectedstyle = new_style;
      addQuanLayer();
    }
  });
  //单击事件
@@ -640,22 +826,31 @@
function addXinzhenquLayer() {
  let Layer = map.getLayerById(100610);
  if (Layer) {
    mars3d.global_variables.layer1002_conifg.show = Layer.options.show;
    map.removeLayer(Layer, true);
    Layer = null;
  };
  //方式2:在创建地球后调用addLayer添加图层(直接new对应type类型的图层类)
  layer_100610_qu = new mars3d.layer.WmsLayer({
    // id : 10,
    id:100610,
    pid: 1006,
    name: "行政区",
    name: mars3d.global_variables.layer100610_conifg.name,
    type: "wms",
    url: "http://58.246.27.194:7011/geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100610_hour",
    url: mars3d.global_variables.geoserver_url_predix+"geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100610_"+mars3d.global_variables.queryDataType,
    crs: "EPSG:4326",
    parameters: {
      "Stayle": "polyline_road_pm25",
      "styles": "polygon_region_"+ mars3d.global_variables.layer100610_conifg.selectedstyle,
      "transparent": "true",
      "format": "image/png",
      "sld": "http://127.0.0.1:8080/geoserver/styles/polygon_region_pm25.sld"
      "viewparams": "userid:" + mars3d.global_variables.userid + ";datatime:" + mars3d.global_variables.queryDataTStart
    },
    center: { "lat": 30.594533, "lng": 121.581681, "alt": 93405, "heading": 359, "pitch": -61 },
    // center: { "lat": 30.594533, "lng": 121.581681, "alt": 93405, "heading": 359, "pitch": -61 },
    getFeatureInfoParameters: {
      feature_count: 10
    },
@@ -671,10 +866,16 @@
      }),
    },
    popup: "all",
    show: false,
    selectedMapStyleOptions: 'pm25',
    hasMapStyleOptions: ['pm25', 'pm10', 'no', 'no2', 'nox', 'co'],
    flyTo: true
    show: mars3d.global_variables.layer100610_conifg.show,
    selectedMapStyleOptions: mars3d.global_variables.layer100610_conifg.selectedstyle,
    hasMapStyleOptions:mars3d.global_variables.layer100610_conifg.styleoptions,
    flyTo: false,
    reloadLayers:function(new_style){
      console.log(new_style);
      console.log(mars3d.global_variables.layer100610_conifg.show);
      mars3d.global_variables.layer100610_conifg.selectedstyle = new_style;
      addXinzhenquLayer();
    }
  });
  //单击事件
@@ -689,27 +890,30 @@
function addJiedaoLayer() {
  let tmpLyaer = map.getLayerById(100611);
  if (tmpLyaer) {
    map.removeLayer(tmpLyaer);
  }
  let Layer = map.getLayerById(100611);
  if (Layer) {
    mars3d.global_variables.layer1002_conifg.show = Layer.options.show;
    map.removeLayer(Layer, true);
    Layer = null;
  };
  //方式2:在创建地球后调用addLayer添加图层(直接new对应type类型的图层类)
  layer_100611_jiedao = new mars3d.layer.WmsLayer({
    id: 100611,
    pid: 1006,
    name: mars3d.globel_variables.layer100600_conifg.name,
    name: mars3d.global_variables.layer100611_conifg.name,
    type: "wms",
    url: mars3d.globel_variables.geoserver_url_predix + "geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100600_" + mars3d.globel_variables.queryDataType,
    url: mars3d.global_variables.geoserver_url_predix + "geoserver/konglu_58/wms",
    layers: "konglu_58:vis_region_100611_" + mars3d.global_variables.queryDataType,
    crs: "EPSG:4326",
    parameters: {
      "styles": "polygon_region_" + mars3d.globel_variables.layer100600_conifg.selectedstyle,
      "Styles": "polygon_region_" + mars3d.global_variables.layer100611_conifg.selectedstyle,
      "transparent": "true",
      "format": "image/png",
      "viewparams": "userid:" + mars3d.globel_variables.userid + ";datatime:" + mars3d.globel_variables.queryDataTStart
      "viewparams": "userid:" + mars3d.global_variables.userid + ";datatime:" + mars3d.global_variables.queryDataTStart
    },
    center: { "lat": 30.466245, "lng": 121.562803, "alt": 107679, "heading": 356, "pitch": -58 },
    // center: { "lat": 30.466245, "lng": 121.562803, "alt": 107679, "heading": 356, "pitch": -58 },
    getFeatureInfoParameters: {
      feature_count: 10
    },
@@ -725,18 +929,20 @@
      }),
    },
    popup: "all",
    show: true,
    selectedMapStyleOptions: mars3d.globel_variables.layer100600_conifg.selectedstyle,
    hasMapStyleOptions: mars3d.globel_variables.layer100600_conifg.styleoptions,
    show: mars3d.global_variables.layer100611_conifg.show,
    selectedMapStyleOptions: mars3d.global_variables.layer100611_conifg.selectedstyle,
    hasMapStyleOptions: mars3d.global_variables.layer100611_conifg.styleoptions,
    flyTo: false,
    reloadLayers:function(new_style){
      console.log(new_style);
      mars3d.globel_variables.layer100600_conifg.selectedstyle = new_style;
      console.log(mars3d.global_variables.layer100611_conifg.show);
      mars3d.global_variables.layer100611_conifg.selectedstyle = new_style;
      addJiedaoLayer();
    }
  });
  console.log(layer_100611_jiedao.show);
  //单击事件
  layer_100611_jiedao.on(mars3d.EventType.click, function (event) {
@@ -777,22 +983,38 @@
function addGrid5Layers() {
  let Layer = map.getLayerById(5000);
  if (Layer) {
    mars3d.global_variables.layer1002_conifg.show = Layer.options.show;
    map.removeLayer(Layer, true);
    Layer = null;
  };
  layer_grid_5000 = new mars3d.layer.WmsLayer({
    id:5000,
    pid: 99,
    name: "网格图层5000",
    name: mars3d.global_variables.layer5000_conifg.name,
    type: "wms",
    url: "http://58.246.27.194:7011/geoserver/konglu_58/wms",
    layers: "konglu_58:vis_grid5000_hour",
    url: mars3d.global_variables.geoserver_url_predix+"geoserver/konglu_58/wms",
    layers: "konglu_58:vis_grid5000_"+mars3d.global_variables.queryDataType,
    crs: "EPSG:4326",
    parameters: {
      "Stayle": "vis_grid100_1000_5000_co",
      "styles":"vis_grid100_1000_5000_"+mars3d.global_variables.layer5000_conifg.selectedstyle,
      "transparent": "true",
      "format": "image/png",
      "sld": "http://127.0.0.1:8080/geoserver/styles/vis_grid100_1000_5000_co.sld"
      "viewparams": "datatime:" + mars3d.global_variables.queryDataTStart
    },
    show: false,
    selectedMapStyleOptions: 'pm25',
    hasMapStyleOptions: ['pm25', 'pm10', 'no', 'no2', 'nox', 'co'],
    show: mars3d.global_variables.layer5000_conifg.show,
    selectedMapStyleOptions: mars3d.global_variables.layer5000_conifg.selectedstyle,
    hasMapStyleOptions: mars3d.global_variables.layer5000_conifg.styleoptions,
    reloadLayers:function(new_style){
      console.log(new_style);
      console.log(mars3d.global_variables.layer5000_conifg.show);
      mars3d.global_variables.layer5000_conifg.selectedstyle = new_style;
      addGrid5Layers();
    }
  });
  map.addLayer(layer_grid_5000);
@@ -821,22 +1043,39 @@
function addGrid1Layers() {
  let Layer = map.getLayerById(1000);
  if (Layer) {
    mars3d.global_variables.layer1002_conifg.show = Layer.options.show;
    map.removeLayer(Layer, true);
    Layer = null;
  };
  layer_grid_1000 = new mars3d.layer.WmsLayer({
    id:1000,
    pid: 99,
    name: "网格图层1000",
    name: mars3d.global_variables.layer1000_conifg.name,
    type: "wms",
    url: "http://58.246.27.194:7011/geoserver/konglu_58/wms",
    layers: "konglu_58:vis_grid1000_hour",
    url:mars3d.global_variables.geoserver_url_predix +"geoserver/konglu_58/wms",
    layers: "konglu_58:vis_grid1000_"+mars3d.global_variables.queryDataType,
    crs: "EPSG:4326",
    parameters: {
      "Stayle": "vis_grid100_1000_5000_co",
      "styles":"vis_grid100_1000_5000_"+mars3d.global_variables.layer1000_conifg.selectedstyle,
      "transparent": "true",
      "format": "image/png",
      "sld": "http://127.0.0.1:8080/geoserver/styles/vis_grid100_1000_5000_co.sld"
      "viewparams": "datatime:" + mars3d.global_variables.queryDataTStart
    },
    show: false,
    selectedMapStyleOptions: 'pm25',
    hasMapStyleOptions: ['pm25', 'pm10', 'no', 'no2', 'nox', 'co'],
    show: mars3d.global_variables.layer1000_conifg.show,
    selectedMapStyleOptions: mars3d.global_variables.layer1000_conifg.selectedstyle,
    hasMapStyleOptions: mars3d.global_variables.layer1000_conifg.styleoptions,
    reloadLayers:function(new_style){
      console.log(new_style);
      console.log(mars3d.global_variables.layer1000_conifg.show);
      mars3d.global_variables.layer1000_conifg.selectedstyle = new_style;
      addGrid1Layers();
    }
  });
  map.addLayer(layer_grid_1000);
@@ -857,8 +1096,6 @@
}
function addFunctionalLayers() {
widgets/manageLayers_style/view.js
@@ -292,7 +292,7 @@
    $('input[type=radio][name=' + tNode.tId + '_style]').change(function () {
      var layer = layersObj[tNode.uuid];
      layer.options.reloadLayers(tmpValue);
      layer.options.reloadLayers(this.value);
    });
  }
widgetsTS/dataTime/widget.js
@@ -68,12 +68,26 @@
      if (window.top) {
        request = $.extend(request, haoutil.system.getRequest(window.top));
      }
      console.log( mars3d.globel_variables);
      mars3d.globel_variables = { geoserver_url_predix:'http://58.246.27.194:7011/',userid: request.userid || 2, queryDataType: 'hour' };
      mars3d.globel_variables.queryDataTStart = this.defaultDateTime;
      mars3d.globel_variables.queryDataTEnd = this.defaultDateTime;
      mars3d.globel_variables.layer100600_conifg={name:'街道',styleoptions:['pm25','pm10'],selectedstyle:'pm25'};
      console.log( mars3d.globel_variables);
      console.log( mars3d.global_variables);
      mars3d.global_variables = { geoserver_url_predix:'http://58.246.27.194:7011/',userid: request.userid || 2, queryDataType: 'hour' };
      mars3d.global_variables.queryDataTStart = this.defaultDateTime;
      mars3d.global_variables.queryDataTEnd = this.defaultDateTime;
      mars3d.global_variables.layer1001_conifg={name:'国控点',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
      mars3d.global_variables.layer1002_conifg={name:'微站',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
      mars3d.global_variables.layer1003_conifg={name:'监测点',styleoptions:['p_01'],selectedstyle:'p_01',show:false};
      mars3d.global_variables.layer1005_conifg={name:'上海市道路',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
      mars3d.global_variables.layer100600_conifg={name:'机场',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
      mars3d.global_variables.layer100601_conifg={name:'码头',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
      mars3d.global_variables.layer100602_conifg={name:'环线',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
      mars3d.global_variables.layer100603_conifg={name:'工业园区',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
      mars3d.global_variables.layer100604_conifg={name:'进博会',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
      mars3d.global_variables.layer100605_conifg={name:'边界',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
      mars3d.global_variables.layer100607_conifg={name:'宝山圈',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
      mars3d.global_variables.layer100610_conifg={name:'行政区',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
      mars3d.global_variables.layer100611_conifg={name:'街道',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
      mars3d.global_variables.layer1000_conifg={name:'网格图层1000',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
      mars3d.global_variables.layer5000_conifg={name:'网格图层5000',styleoptions:['pm25','pm10','no','no2','nox','co'],selectedstyle:'pm25',show:false};
      console.log( mars3d.global_variables);
    }
@@ -94,7 +108,7 @@
          $('#appDate').show()
          $('#appDateHour').hide()
        }
        mars3d.globel_variables.queryDataType = value;
        mars3d.global_variables.queryDataType = value;
      });
      $("#appDate").datetimepicker({
@@ -111,8 +125,8 @@
        todayHighlight: 1  //如果为true, 高亮当前日期
      }).on("changeDate", function () {
        mars3d.globel_variables.queryDataTStart = $('#appDate').val() + " 00:00:00";
        console.log(mars3d.globel_variables.queryDataTStart);
        mars3d.global_variables.queryDataTStart = $('#appDate').val() + " 00:00:00";
        console.log(mars3d.global_variables.queryDataTStart);
        // 在 function.js 中定义的 function
        addguokongLayers();
@@ -136,7 +150,7 @@
        reloadTop10();
        reLoadLayers();
        refreshWidgets();
        // refreshWidgets();
      });
      $("#appDate").datetimepicker("setDate", new Date(this.defaultDate));
@@ -156,8 +170,8 @@
        todayHighlight: 1  //如果为true, 高亮当前日期
      }).on("changeDate", function () {
        mars3d.globel_variables.queryDataTStart = $('#appDateHour').val();
        console.log(mars3d.globel_variables.queryDataTStart);
        mars3d.global_variables.queryDataTStart = $('#appDateHour').val();
        console.log(mars3d.global_variables.queryDataTStart);
        // 在 function.js 中定义的 function
        addguokongLayers();
        addWeizhanLayer();
@@ -179,8 +193,8 @@
        
        reloadTop10();
        reLoadLayers();
        refreshWidgets();
        // reLoadLayers();
        // refreshWidgets();
      });
      $("#appDateHour").datetimepicker("setDate", new Date(this.defaultDateTime));
      $('#appDateHour').datetimepicker('setEndDate', new Date(this.defaultDateTime));