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

Method getMeta

src/map-feature.js:592–608  ·  view source on GitHub ↗
(metaName)

Source from the content-addressed store, hash-verified

590 return newZoom;
591 }
592 getMeta(metaName) {
593 let name = metaName.toLowerCase();
594 if (name !== 'cs' && name !== 'zoom' && name !== 'projection') return;
595 let sdMeta = this._parentEl.shadowRoot.querySelector(
596 `map-meta[name=${name}][content]`
597 );
598 if (this._parentEl.nodeName === 'MAP-LINK') {
599 // sd.map-meta || map-extent meta || layer meta
600 return sdMeta || this._parentEl.parentElement.getMeta(metaName);
601 } else {
602 return this._parentEl.src
603 ? this._parentEl.shadowRoot.querySelector(
604 `map-meta[name=${name}][content]`
605 )
606 : this._parentEl.querySelector(`map-meta[name=${name}][content]`);
607 }
608 }
609 // internal support for returning a GeoJSON representation of <map-feature> geometry
610 // The options object can contain the following:
611 // propertyFunction - function(<map-properties>), A function that maps the features' <map-properties> element to a GeoJSON "properties" member.

Callers 4

zoomMethod · 0.95
minMethod · 0.95
maxMethod · 0.95
_getFallbackCSMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected