* @function Theme.prototype.setOpacity * @description 设置图层的不透明度,取值范围:[0-1]。 * @param {number} opacity - 不透明度。
(opacity)
| 176 | * @param {number} opacity - 不透明度。 |
| 177 | */ |
| 178 | setOpacity(opacity) { |
| 179 | if (opacity !== this.opacity) { |
| 180 | this.opacity = opacity; |
| 181 | var element = this.div; |
| 182 | CommonUtil.modifyDOMElement(element, null, null, null, |
| 183 | null, null, null, opacity); |
| 184 | |
| 185 | if (this.map !== null) { |
| 186 | this.dispatchEvent({type: 'changelayer', value: {layer: this, property: "opacity"}}); |
| 187 | } |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | /** |
| 192 | * @function Theme.prototype.addFeatures |