MCPcopy Create free account
hub / github.com/Maps4HTML/MapML.js / countTileLayers

Method countTileLayers

src/layer.js:639–651  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

637
638 _validateDisabled() {
639 const countTileLayers = () => {
640 let totalCount = 0;
641 let disabledCount = 0;
642
643 this._layer.eachLayer((layer) => {
644 if (layer instanceof MapTileLayer) {
645 totalCount++;
646 if (!layer.isVisible()) disabledCount++;
647 }
648 });
649
650 return { totalCount, disabledCount };
651 };
652 const countFeatureLayers = () => {
653 let totalCount = 0;
654 let disabledCount = 0;

Callers

nothing calls this directly

Calls 1

isVisibleMethod · 0.80

Tested by

no test coverage detected