| 650 | return { totalCount, disabledCount }; |
| 651 | }; |
| 652 | const countFeatureLayers = () => { |
| 653 | let totalCount = 0; |
| 654 | let disabledCount = 0; |
| 655 | |
| 656 | this._layer.eachLayer((layer) => { |
| 657 | if (layer instanceof MapFeatureLayer) { |
| 658 | totalCount++; |
| 659 | if (!layer.isVisible()) disabledCount++; |
| 660 | } |
| 661 | }); |
| 662 | |
| 663 | return { totalCount, disabledCount }; |
| 664 | }; |
| 665 | // setTimeout is necessary to make the validateDisabled happen later than the moveend operations etc., |
| 666 | // to ensure that the validated result is correct |
| 667 | setTimeout(() => { |