MCPcopy Index your code
hub / github.com/Maps4HTML/MapML.js / max

Method max

src/map-feature.js:91–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 6

getMetaMethod · 0.95
getMapElMethod · 0.95
getLayerElMethod · 0.95
getAttributeMethod · 0.80
getZoomBoundsMethod · 0.80
setAttributeMethod · 0.80

Tested by

no test coverage detected