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