MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / _getTransformRequest

Method _getTransformRequest

src/common/mapping/WebMapV3.js:314–329  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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;

Callers 2

_createMapMethod · 0.95
_getAddL7LayersParamsMethod · 0.95

Calls 1

indexOfMethod · 0.80

Tested by

no test coverage detected