wangzhibo
2021-11-02 8a4b8e1f0fc75d144ef4e48f0d0f9554502b4bf6
js/function.js
@@ -99,8 +99,8 @@
    if ([layer.type] == 'wms') {
      layer.options.layers = "konglu_58:" + layer.options.geoname_prefix + mars3d.global_variables.queryDataType;
      layer.options.parameters.viewparams = "userid:" + mars3d.global_variables.userid +";regiontype:" + layer.options.regiontype + ";datetime:" + mars3d.global_variables.queryDataTStartGeo
      layer.options.getFeatureInfoParameters.viewparams = "userid:" + mars3d.global_variables.userid +";regiontype:" + layer.options.regiontype + ";datetime:" + mars3d.global_variables.queryDataTStartGeo
      layer.options.parameters.viewparams = "userid:" + mars3d.global_variables.userid + ";regiontype:" + layer.options.regiontype + ";datetime:" + mars3d.global_variables.queryDataTStartGeo
      layer.options.getFeatureInfoParameters.viewparams = "userid:" + mars3d.global_variables.userid + ";regiontype:" + layer.options.regiontype + ";datetime:" + mars3d.global_variables.queryDataTStartGeo
      layer.reload();
    } else if ([layer.id] == 1001 && layer.options.show) {
      var tmpguokong = map.getLayerById(1001);
@@ -122,12 +122,12 @@
function refreshWidgets() {
  refreshSingleWidget("widgetsTS/weather/widget.js",{});
  refreshSingleWidget("widgetsTS/widget_summary/widget.js",{});
  refreshSingleWidget("widgetsTS/weather/widget.js", {});
  refreshSingleWidget("widgetsTS/widget_summary/widget.js", {});
}
function refreshSingleWidget(widget_path,params){
function refreshSingleWidget(widget_path, params) {
  if (mars3d.widget.isActivate(widget_path)) {
    var tempWiget = mars3d.widget.getClass(widget_path);
@@ -137,7 +137,7 @@
}
function addGraphictoHighlightLayer() {
  mars3d.global_variables.tmpHighlightGraphicLayer.addGraphic(mars3d.global_variables.tmpHighlightGraphic);
}
function addHighlightLayerClearButton() {
@@ -152,19 +152,19 @@
  map.addControl(clearButton);
}
function showDetail(layerid, itemCode,qindex) {
function showDetail(layerid, itemCode, qindex) {
  if (mars3d.widget.isActivate("widgetsTS/widget_detail/widget.js")) {
    var detailWiget = mars3d.widget.getClass("widgetsTS/widget_detail/widget.js");
    detailWiget.reloadData({ "nodejs_url_predix": mars3d.global_variables.nodejs_url_predix, "datatype":  mars3d.global_variables.queryDataType,"selected_qindex": qindex,"datatime":  mars3d.global_variables.queryDataTStart, "layerid": layerid, "siteid": itemCode });
    detailWiget.reloadData({ "nodejs_url_predix": mars3d.global_variables.nodejs_url_predix, "datatype": mars3d.global_variables.queryDataType, "selected_qindex": qindex, "datatime": mars3d.global_variables.queryDataTStart, "layerid": layerid, "siteid": itemCode });
  } else {
    mars3d.widget.activate({
      uri: "widgetsTS/widget_detail/widget.js",
      params: { "nodejs_url_predix": mars3d.global_variables.nodejs_url_predix, "datatype":  mars3d.global_variables.queryDataType,"selected_qindex": qindex,"datatime":  mars3d.global_variables.queryDataTStart, "layerid": layerid, "siteid": itemCode },
      params: { "nodejs_url_predix": mars3d.global_variables.nodejs_url_predix, "datatype": mars3d.global_variables.queryDataType, "selected_qindex": qindex, "datatime": mars3d.global_variables.queryDataTStart, "layerid": layerid, "siteid": itemCode },
    });
  }
}
function showHistoryPathDetail(itemCode){
function showHistoryPathDetail(itemCode) {
  if (mars3d.widget.isActivate("widgetsTS/taxiRouteReplay/widget.js")) {
    var detailWiget = mars3d.widget.getClass("widgetsTS/taxiRouteReplay/widget.js");
@@ -175,4 +175,14 @@
      params: itemCode,
    });
  }
}
function changeNullAndundefinedToEmpty(json_in) {
  for (var key in json_in) {
    if (json_in[key] == null || json_in[key] == 'null' || json_in[key] == undefined || json_in[key] == 'undefined') {
      json_in[key] = "";
    }
  }
  return json_in;
}