()
| 312 | } |
| 313 | |
| 314 | _getTransformRequest() { |
| 315 | if (this.mapOptions.transformRequest) { |
| 316 | return this.mapOptions.transformRequest; |
| 317 | } |
| 318 | return (url, resourceType) => { |
| 319 | const withCredentials = this.options.iportalServiceProxyUrlPrefix && url.indexOf(this.options.iportalServiceProxyUrlPrefix) >= 0 ? 'include' : undefined; |
| 320 | if (resourceType === 'Tile' || resourceType === 'Image') { |
| 321 | return { |
| 322 | url: url, |
| 323 | credentials: withCredentials, |
| 324 | ...(this.options.tileTransformRequest && this.options.tileTransformRequest(url)) |
| 325 | }; |
| 326 | } |
| 327 | return { url, credentials: withCredentials}; |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | _registerMapCRS(mapInfo) { |
| 332 | const { crs } = mapInfo; |
no test coverage detected