* @private * @function WebMapV3.prototype._getLabelFontFamily * @description 获取图层字体类型。
()
| 726 | * @description 获取图层字体类型。 |
| 727 | */ |
| 728 | _getLabelFontFamily() { |
| 729 | const fonts = ['sans-serif']; |
| 730 | const layers = this._mapInfo.layers; |
| 731 | if (layers && layers.length > 0) { |
| 732 | layers.forEach((layer) => { |
| 733 | const textFont = (layer.layout && layer.layout['text-font']) || []; |
| 734 | fonts.push(...textFont); |
| 735 | }); |
| 736 | } |
| 737 | const fontFamilys = fonts.join(','); |
| 738 | return fontFamilys; |
| 739 | } |
| 740 | |
| 741 | /** |
| 742 | * @private |
no test coverage detected