| | |
| | | |
| | | $('input[type=radio][name=' + tNode.tId + '_style]').change(function () { |
| | | var layer = layersObj[tNode.uuid]; |
| | | // 通过判断是否有复选框赋值 |
| | | var a = $('input[type=checkbox][id=' + tNode.tId + '_prefix]')[0] == undefined ? false : $('input[type=checkbox][id=' + tNode.tId + '_prefix]')[0].checked; |
| | | if (layer.options.type =='wms'){ |
| | | layer.options.parameters.styles = layer.options.style_prefix+this.value; |
| | | layer.options.parameters.styles = a ? 'visible_' + layer.options.style_prefix + this.value : layer.options.style_prefix + this.value; |
| | | layer.options.style_selected = this.value; |
| | | layer.reload(); |
| | | //监测区域 |
| | |
| | | }); |
| | | |
| | | $('input[type=checkbox][id=' + tNode.tId + '_prefix]').click(function () { |
| | | var layer = layersObj[tNode.uuid]; |
| | | var childDom = $('input[type=radio][name=' + tNode.tId + '_style]:checked').val() |
| | | if ($(this).is(":checked")) { |
| | | $('input[type=radio][name=' + tNode.tId + '_style]').change(function () { |
| | | var layer = layersObj[tNode.uuid]; |
| | | if (layer.options.type =='wms'){ |
| | | layer.options.parameters.styles = 'visible_'+layer.options.style_prefix+this.value; |
| | | layer.options.style_selected = this.value; |
| | | layer.options.parameters.styles = 'visible_' + layer.options.style_prefix + childDom; |
| | | layer.options.style_selected = childDom; |
| | | layer.reload(); |
| | | //监测区域 |
| | | }else if (layer.options.id ==1001){ |
| | | layer.options.style_selected = this.value; |
| | | layer.options.style_selected = childDom; |
| | | layer.changeColor(); |
| | | //国控点 |
| | | }else if (layer.options.id ==1004){ |
| | | layer.options.style_selected = this.value; |
| | | layer.options.style_selected = childDom; |
| | | //移动监测点 |
| | | } |
| | | }); |
| | | }else { |
| | | $('input[type=radio][name=' + tNode.tId + '_style]').change(function () { |
| | | var layer = layersObj[tNode.uuid]; |
| | | console.log("取消选择") |
| | | console.log(this, "this") |
| | | if (layer.options.type =='wms'){ |
| | | layer.options.parameters.styles = layer.options.style_prefix+this.value; |
| | | layer.options.style_selected = this.value; |
| | | |
| | | layer.options.parameters.styles = layer.options.style_prefix + childDom; |
| | | layer.options.style_selected = childDom; |
| | | layer.reload(); |
| | | //监测区域 |
| | | }else if (layer.options.id ==1001){ |
| | | layer.options.style_selected = this.value; |
| | | layer.options.style_selected = childDom; |
| | | layer.changeColor(); |
| | | //国控点 |
| | | }else if (layer.options.id ==1004){ |
| | | layer.options.style_selected = this.value; |
| | | layer.options.style_selected = childDom; |
| | | //移动监测点 |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | } |