* @private * @function WebMap.prototype.createPointSeries * @description 创建点系列 * @param {Object} layerInfo 图层参数 * @param {Array} pointData 点数据 * @returns {Object} 点系列
(layerInfo, pointData)
| 4724 | * @returns {Object} 点系列 |
| 4725 | */ |
| 4726 | createPointSeries(layerInfo, pointData) { |
| 4727 | let lineSetting = layerInfo.lineSetting; |
| 4728 | let animationSetting = layerInfo.animationSetting; |
| 4729 | let labelSetting = layerInfo.labelSetting; |
| 4730 | let pointSeries = [ |
| 4731 | { |
| 4732 | name: 'point-series', |
| 4733 | coordinateSystem: 'geo', |
| 4734 | zlevel: 2, |
| 4735 | silent: true, |
| 4736 | label: { |
| 4737 | normal: { |
| 4738 | show: labelSetting.show, |
| 4739 | position: 'right', |
| 4740 | formatter: '{b}', |
| 4741 | color: labelSetting.color, |
| 4742 | fontFamily: labelSetting.fontFamily |
| 4743 | } |
| 4744 | }, |
| 4745 | itemStyle: { |
| 4746 | normal: { |
| 4747 | color: lineSetting.color || labelSetting.color |
| 4748 | } |
| 4749 | }, |
| 4750 | data: pointData |
| 4751 | } |
| 4752 | ]; |
| 4753 | |
| 4754 | if (animationSetting.show) { |
| 4755 | // 开启动画 |
| 4756 | pointSeries[0].type = 'effectScatter'; |
| 4757 | pointSeries[0].rippleEffect = { |
| 4758 | brushType: 'stroke' |
| 4759 | }; |
| 4760 | } else { |
| 4761 | // 关闭动画 |
| 4762 | pointSeries[0].type = 'scatter'; |
| 4763 | } |
| 4764 | |
| 4765 | return pointSeries; |
| 4766 | } |
| 4767 | |
| 4768 | /** |
| 4769 | * @private |