* @function OverlayGraphic.prototype.setStyle * @description 设置要素样式。 * @param {ol.style.Image} style - 样式,ol.style.Image 子类样式对象。
(style)
| 112 | * @param {ol.style.Image} style - 样式,ol.style.Image 子类样式对象。 |
| 113 | */ |
| 114 | setStyle(style) { |
| 115 | if (!this.style && !style) { |
| 116 | return; |
| 117 | } |
| 118 | this.style_ = style; |
| 119 | this.styleFunction_ = !style ? |
| 120 | undefined : Graphic.createStyleFunction(new Style({ |
| 121 | image: style |
| 122 | })); |
| 123 | this.changed(); |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * @function OverlayGraphic.prototype.getStyleFunction |
no test coverage detected