code: function determineVersion(json) {
  	var version = 'unknown';
  	if (json) {
  		if (json.WMS_Capabilities) {
  			if (json.WMS_Capabilities.$) {
  				if (json.WMS_Capabilities.$.version) {
  					version = json.WMS_Capabilities.$.version;
  				}
  			}
  		} else {
  			if (json.WMT_MS_Capabilities) {
  				if (json.WMT_MS_Capabilities.$) {
  					if (json.WMT_MS_Capabilities.$.version) {
  						version = json.WMT_MS_Capabilities.$.version;
  					}
  				}
  			}
  		}
  	}
  	return version;
  }
docs: It determines the version of GetCapabilities document.
  
  @param json
  {object} GetCapabilities document as JSON.
  @returns {String} Version of GetCapabilities document. If the version can't
  determined, it will return 'unknown'.