({
type,
sourceID,
layerID,
parentLayerId,
beforeId,
style,
minzoom,
maxzoom,
filter
})
| 1783 | |
| 1784 | const visible = layerInfo.visible; |
| 1785 | const layerCreateFcuntion = ({ |
| 1786 | type, |
| 1787 | sourceID, |
| 1788 | layerID, |
| 1789 | parentLayerId, |
| 1790 | beforeId, |
| 1791 | style, |
| 1792 | minzoom, |
| 1793 | maxzoom, |
| 1794 | filter |
| 1795 | }) => { |
| 1796 | const layerStyle = { |
| 1797 | style: this._transformStyleToMapBoxGl({ ...style }, type), |
| 1798 | layout: { |
| 1799 | visibility: visible |
| 1800 | } |
| 1801 | }; |
| 1802 | this._addOverlayToMap({ |
| 1803 | type, |
| 1804 | source: sourceID, |
| 1805 | layerID, |
| 1806 | parentLayerId, |
| 1807 | beforeId, |
| 1808 | layerStyle, |
| 1809 | minzoom, |
| 1810 | maxzoom, |
| 1811 | filter |
| 1812 | }); |
| 1813 | }; |
| 1814 | if (['POLYGON', 'LINE'].includes(type)) { |
| 1815 | // linedash不能用表达式处理,需用多个图层 |
| 1816 | const lineDashExpression = expressionMap.lineDash; |
nothing calls this directly
no test coverage detected