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

Method copyRemoteContentToShadowRoot

src/layer.js:439–448  ·  view source on GitHub ↗
(mapml)

Source from the content-addressed store, hash-verified

437 }
438
439 copyRemoteContentToShadowRoot(mapml) {
440 let shadowRoot = this.shadowRoot;
441 // get the map-meta[name=projection/cs/extent/zoom] from map-head of remote mapml, attach them to the shadowroot
442 let frag = document.createDocumentFragment();
443 let elements = mapml.querySelectorAll('map-head > *, map-body > *');
444 for (let i = 0; i < elements.length; i++) {
445 frag.appendChild(elements[i]);
446 }
447 shadowRoot.appendChild(frag);
448 }
449 /**
450 * For "local" content, getProjection will use content of "this"
451 * For "remote" content, you need to pass the shadowRoot to search through

Callers 1

_onAddMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected