MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / isValidResponse

Method isValidResponse

src/openlayers/mapping/WebMap.js:1990–2000  ·  view source on GitHub ↗

* @private * @function WebMap.prototype.isValidResponse * @description 返回信息是否符合对应类型的标准 * @param {Object} response - 返回的信息 * @returns {boolean}

(response)

Source from the content-addressed store, hash-verified

1988 * @returns {boolean}
1989 */
1990 isValidResponse(response) {
1991 let responseEnum = ['Contents', 'OperationsMetadata'],
1992 valid = true;
1993 for (let i = 0; i < responseEnum.length; i++) {
1994 if (!response[responseEnum[i]] || response.error) {
1995 valid = false;
1996 break;
1997 }
1998 }
1999 return valid;
2000 }
2001
2002 /**
2003 * @private

Callers 2

successCallbackFunction · 0.80
getWmtsInfoMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected