* @private * @function Range.prototype.createThematicFeature * @description 创建专题图要素。 * @param {Object} feature - 要创建的专题图形要素。
(feature)
| 61 | * @param {Object} feature - 要创建的专题图形要素。 |
| 62 | */ |
| 63 | createThematicFeature(feature) { |
| 64 | //赋 style |
| 65 | var style = this.getStyleByData(feature); |
| 66 | //创建专题要素时的可选参数 |
| 67 | var options = {}; |
| 68 | options.nodesClipPixel = this.nodesClipPixel; |
| 69 | options.isHoverAble = this.isHoverAble; |
| 70 | options.isMultiHover = this.isMultiHover; |
| 71 | options.isClickAble = this.isClickAble; |
| 72 | options.highlightStyle = ShapeFactory.transformStyle(this.highlightStyle); |
| 73 | |
| 74 | //将数据转为专题要素(ThemeVector) |
| 75 | var thematicFeature = new ThemeVector(feature, this, ShapeFactory.transformStyle(style), options); |
| 76 | |
| 77 | //直接添加图形到渲染器 |
| 78 | for (var m = 0; m < thematicFeature.shapes.length; m++) { |
| 79 | this.renderer.addShape(thematicFeature.shapes[m]); |
| 80 | } |
| 81 | |
| 82 | return thematicFeature; |
| 83 | } |
| 84 | |
| 85 | /** |
| 86 | * @private |
nothing calls this directly
no test coverage detected