* @function Graphic.prototype.setStyle * @description 设置图层要素整体样式(接口仅在 webgl 渲染时有用)。 * @param {Object} styleOptions - 样式对象。 * @param {Array. } [styleOptions.color=[0, 0, 0, 255]] - 点颜色。 * @param {number} [styleOptions.radius=10] - 点半径,单位为像素。 * @param {number} [sty
(styleOptions)
| 426 | * @param {boolean} [styleOptions.outline=false] - 是否显示边框。 |
| 427 | */ |
| 428 | setStyle(styleOptions) { |
| 429 | let self = this; |
| 430 | let styleOpt = { |
| 431 | color: self.color, |
| 432 | radius: self.radius, |
| 433 | opacity: self.opacity, |
| 434 | highlightColor: self.highlightColor, |
| 435 | radiusScale: self.radiusScale, |
| 436 | radiusMinPixels: self.radiusMinPixels, |
| 437 | radiusMaxPixels: self.radiusMaxPixels, |
| 438 | strokeWidth: self.strokeWidth, |
| 439 | outline: self.outline |
| 440 | }; |
| 441 | |
| 442 | CommonUtil.extend(self, CommonUtil.extend(styleOpt, styleOptions)); |
| 443 | self.update(); |
| 444 | } |
| 445 | |
| 446 | /** |
| 447 | * @function Graphic.prototype.getLayerState |
no test coverage detected