| 922 | } |
| 923 | |
| 924 | function getSelectType(currentLayer) { |
| 925 | const layout = currentLayer.layout || {}; |
| 926 | if ( |
| 927 | currentLayer.type === 'heatmap' && |
| 928 | layout['heatmap-shape'] && |
| 929 | ['square', 'hexagon'].includes(layout['heatmap-shape']) |
| 930 | ) { |
| 931 | return SelectStyleTypes.heatGrid; |
| 932 | } |
| 933 | if ( |
| 934 | currentLayer.type === 'heatmap-extrusion' && |
| 935 | layout['heatmap-extrusion-shape'] && |
| 936 | ['squareColumn', 'hexagonColumn'].includes(layout['heatmap-extrusion-shape']) |
| 937 | ) { |
| 938 | return SelectStyleTypes.heat3DGrid; |
| 939 | } |
| 940 | if (currentLayer.type === 'heatmap-extrusion') { |
| 941 | return SelectStyleTypes.heat3D; |
| 942 | } |
| 943 | if (currentLayer.type === 'chart' && ['bar', 'line'].includes(layout['chart-type'])) { |
| 944 | return SelectStyleTypes.bar; |
| 945 | } |
| 946 | if (currentLayer.type === 'chart' && layout['chart-type'] === 'pie') { |
| 947 | return SelectStyleTypes.pie; |
| 948 | } |
| 949 | if (currentLayer.type === 'radar') { |
| 950 | return SelectStyleTypes.radarPoint; |
| 951 | } |
| 952 | if (currentLayer.type === 'point-extrusion') { |
| 953 | return SelectStyleTypes.column; |
| 954 | } |
| 955 | if (['line-curve', 'line-curve-extrusion'].includes(currentLayer.type)) { |
| 956 | return SelectStyleTypes.od; |
| 957 | } |
| 958 | if (currentLayer.type === 'line-extrusion') { |
| 959 | return SelectStyleTypes.line; |
| 960 | } |
| 961 | if (layout['circle-animate-rings'] !== undefined) { |
| 962 | return SelectStyleTypes.animatePoint; |
| 963 | } |
| 964 | return ''; |
| 965 | } |
| 966 | |
| 967 | function getPaintOrLayutByStyleName(styleName) { |
| 968 | return layoutStyleNames.includes(styleName) ? 'layout' : 'paint'; |