()
| 89 | } |
| 90 | |
| 91 | get max() { |
| 92 | // for templated or queried features ** native zoom is only used for zoomTo() ** |
| 93 | let meta = {}, |
| 94 | metaEl = this.getMeta('zoom'); |
| 95 | if (metaEl) |
| 96 | meta = Util._metaContentToObject(metaEl.getAttribute('content')); |
| 97 | let projectionMaxZoom = |
| 98 | this.getMapEl()._map.options.crs.options.resolutions.length - 1; |
| 99 | if (this._parentEl.nodeName === 'MAP-LINK') { |
| 100 | // maxZoom = max attribute || sd.map-meta max zoom || map-link maxZoom |
| 101 | return +(this.hasAttribute('max') |
| 102 | ? this.getAttribute('max') |
| 103 | : meta.max |
| 104 | ? meta.max |
| 105 | : this._parentEl.getZoomBounds().maxZoom); |
| 106 | } else { |
| 107 | // for "static" features |
| 108 | // maxZoom = max attribute || map-meta zoom max || projection maxZoom |
| 109 | return +(this.hasAttribute('max') |
| 110 | ? this.getAttribute('max') |
| 111 | : meta.max |
| 112 | ? meta.max |
| 113 | : projectionMaxZoom); |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | set max(val) { |
| 118 | var parsedVal = parseInt(val, 10); |
nothing calls this directly
no test coverage detected