wangzhibo
2021-09-30 5554abba41acebfcefd0c6eccd51d0f229b2f43d
js/function.js
@@ -41,14 +41,13 @@
    (day > 9 ? day : ("0" + day)) +
    (hours > 9 ? hours : ("0" + hours)) + "0000";
}
mars3d.global_variables = { geoserver_url_predix: 'http://58.246.27.194:7011/', nodejs_url_predix: 'http://58.246.27.194:7012/', userid: 2, queryDataType: 'hour' };
mars3d.global_variables = { geoserver_url_predix: 'http://58.246.27.194:7011/', nodejs_url_predix: 'http://58.246.27.194:7012/', userid: 2, queryDataType: 'hour',weathercitycode:'101020100',wind360:0,windSpeed:10 }
mars3d.global_variables.queryDataTStart = getDefaultDateTime();
mars3d.global_variables.queryDataTStartGeo = getDefaultDateTimeGeo();
mars3d.global_variables.queryDataTEnd = getDefaultDateTimeEnd();
// for tmp hight light graphic and 
//mars3d.global_variables.tmpHighlightGraphic;
//mars3d.global_variables.tmpHighlightGraphicLayer;
function initLayersByUserid() {
@@ -88,7 +87,6 @@
      layer.options.parameters.viewparams = "userid:" + mars3d.global_variables.userid + ";datatime:" + mars3d.global_variables.queryDataTStartGeo;
      layer.reload();
    } else if ([layer.id] == 1001) {
      var tmpguokong = map.getLayerById(1001);
      tmpguokong.clear(true);
      getGuokongPointFromServer(tmpguokong);
@@ -108,6 +106,23 @@
function refreshWidgets() {
  refreshSingleWidget("widgetsTS/weather/widget.js",{});
}
function refreshSingleWidget(widget_path,params){
  if (mars3d.widget.isActivate(widget_path)) {
    var tempWiget = mars3d.widget.getClass(widget_path);
    tempWiget.reloadData();
  } else {
    var tempWiget =mars3d.widget.activate({
      uri: widget_path,
      params: params,
    });
    tempWiget.reloadData();
  }
}
function addGraphictoHighlightLayer() {
  mars3d.global_variables.tmpHighlightGraphicLayer.addGraphic(mars3d.global_variables.tmpHighlightGraphic);