()
| 422 | // native cs: used by FeatureLayer._geometryToLayer(...), |
| 423 | // the fallback cs for map-geometry if its cs attribute is not specified |
| 424 | _getFallbackCS() { |
| 425 | let csMeta; |
| 426 | if (this._parentEl.nodeName === 'MAP-LINK') { |
| 427 | // feature attaches to link's shadow root |
| 428 | csMeta = |
| 429 | this._parentEl.shadowRoot.querySelector('map-meta[name=cs][content]') || |
| 430 | this._parentEl.parentElement.getMeta('cs'); |
| 431 | } else { |
| 432 | let layerEl = this.getLayerEl(); |
| 433 | csMeta = layerEl.src |
| 434 | ? layerEl.shadowRoot.querySelector('map-meta[name=cs][content]') |
| 435 | : layerEl.querySelector('map-meta[name=cs][content]'); |
| 436 | } |
| 437 | // even here we could make an effort to use the tref variables to determine |
| 438 | // the coordinate system of the response - would only work with WMS, I think |
| 439 | // the fallback 'gcrs' SHOULD be specified by the MapML spec |
| 440 | // per https://github.com/Maps4HTML/MapML/issues/257 |
| 441 | return csMeta |
| 442 | ? Util._metaContentToObject(csMeta.getAttribute('content')).content |
| 443 | : 'gcrs'; |
| 444 | } |
| 445 | |
| 446 | // Util functions: |
| 447 | // internal method to calculate the extent of the feature and store it in cache for the first time |
no test coverage detected