code: function(newQueryCriteria, requireCenterAndRadius) {
    if (typeof newQueryCriteria !== "object") {
      throw new Error("query criteria must be an object");
    }
    else if (typeof newQueryCriteria.center === "undefined" && typeof newQueryCriteria.radius === "undefined") {
      throw new Error("radius and/or center must be specified");
    }
    else if (requireCenterAndRadius && (typeof newQueryCriteria.center === "undefined" || typeof newQueryCriteria.radius === "undefined")) {
      throw new Error("query criteria for a new query must contain both a center and a radius");
    }
  
    //如果有任何附加属性抛出错误
    var keys = Object.keys(newQueryCriteria);
    var numKeys = keys.length;
    for (var i = 0; i < numKeys; ++i) {
      var key = keys[i];
      if (key !== "center" && key !== "radius") {
        throw new Error("Unexpected attribute '" + key + "'' found in query criteria");
      }
    }
  
    // 校验圆心属性
    if (typeof newQueryCriteria.center !== "undefined") {
      validateLocation(newQueryCriteria.center);
    }
  
    // 验半径属性
    if (typeof newQueryCriteria.radius !== "undefined") {
      if (typeof newQueryCriteria.radius !== "number" || isNaN(newQueryCriteria.radius)) {
        throw new Error("radius must be a number");
      }
      else if (newQueryCriteria.radius < 0) {
        throw new Error("radius must be greater than or equal to 0");
      }
    }
  }
docs: Validates the inputted query criteria and throws an error if it is invalid.
  校验输入的查询条件，不合法则抛出错误
  @param {Object} newQueryCriteria 指定了圆心和半径的查询条件