()
| 912 | return bnds; |
| 913 | } |
| 914 | getBase() { |
| 915 | let layer = this.getRootNode().host; |
| 916 | // |
| 917 | let relativeURL = |
| 918 | this.getRootNode().querySelector('map-base') && |
| 919 | this.getRootNode() instanceof ShadowRoot |
| 920 | ? this.getRootNode().querySelector('map-base').getAttribute('href') |
| 921 | : /* local content? */ !(this.getRootNode() instanceof ShadowRoot) |
| 922 | ? /* use the baseURI algorithm which takes into account any <base> */ |
| 923 | this.getRootNode().querySelector('map-base')?.getAttribute('href') || |
| 924 | this.baseURI |
| 925 | : /* else use the resolved <map-layer src="..."> value */ new URL( |
| 926 | layer.src, |
| 927 | layer.baseURI |
| 928 | ).href; |
| 929 | |
| 930 | // when remote content, use layer.src as base else use baseURI of map-link |
| 931 | let baseURL = |
| 932 | this.getRootNode() instanceof ShadowRoot |
| 933 | ? new URL(layer.src, layer.baseURI).href |
| 934 | : this.baseURI; |
| 935 | return new URL(relativeURL, baseURL).href; |
| 936 | } |
| 937 | /** |
| 938 | * Return BOTH min/max(Display)Zoom AND min/maxNativeZoom which |
| 939 | * are options that can be passed to GridLayer... |
no test coverage detected