wangzhibo
2021-09-24 696254697bba0fa3f13af4f686eaf8b7f09e1c43
widgets/manageLayers_style/view.js
@@ -273,16 +273,16 @@
  }
  if (layer.options.hasMapStyleOptions) {
    var view = $("#" + tNode.tId);
    var radio_html = '<div id="'+tNode.tId+'_style" style="color: white;">';
    var radio_html = '<div id="' + tNode.tId + '_style" style="color: white;">';
    let item = layer.options.hasMapStyleOptions;
    for (var i = 0, len = item.length; i < len; i++) {
      radio_html += '<span class="button level1 switch center_docu" ></span><label><input type="radio" name="' + tNode.tId + '_style" value="" '+(item[i]==layer.options.selectedMapStyleOptions?"checked":"")+'/>'+item[i].toUpperCase()+'</label></br>';
      radio_html += '<span class="button level1 switch center_docu" ></span><label><input type="radio" name="' + tNode.tId + '_style" value="'+item[i]+'" ' + (item[i] == layer.options.selectedMapStyleOptions ? "checked" : "") + '/>' + item[i].toUpperCase() + '</label></br>';
    }
    radio_html +='</div>';
    radio_html += '</div>';
    view.append(radio_html);
@@ -290,12 +290,10 @@
      $("#" + tNode.tId + "_style").hide();
    }
    $('input[type=radio][name='+ tNode.tId + '_style]').change(function() {
    $('input[type=radio][name=' + tNode.tId + '_style]').change(function () {
      var layer = layersObj[tNode.uuid];
        layer.options.selectedMapStyleOptions = this.value;
        mars3d.reloadLayers(layer.id);
      });
      layer.options.reloadLayers(tmpValue);
    });
  }