(scale)
| 759 | } |
| 760 | |
| 761 | validScale(scale) { |
| 762 | if (!scale) { |
| 763 | return false; |
| 764 | } |
| 765 | const scaleNum = scale.split(':')[1]; |
| 766 | if (!scaleNum) { |
| 767 | return false; |
| 768 | } |
| 769 | const res = 1 / +scaleNum; |
| 770 | if (res === Infinity || res >= 1) { |
| 771 | return false; |
| 772 | } |
| 773 | return true; |
| 774 | } |
| 775 | |
| 776 | limitScale(mapInfo, baseLayer) { |
| 777 | if (this.validScale(mapInfo.minScale) && this.validScale(mapInfo.maxScale)) { |