code: function(layer, xy) {
          var loc = this.map.getLonLatFromPixel(xy);
          var getTileUrl = layer.getURL(
              new OpenLayers.Bounds(loc.lon, loc.lat, loc.lon, loc.lat)
          );
          var params = OpenLayers.Util.getParameters(getTileUrl);
          var tileInfo = layer.getTileInfo(loc);
          OpenLayers.Util.extend(params, {
              service: "WMTS",
              version: layer.version,
              request: "GetFeatureInfo",
              infoFormat: this.infoFormat,
              i: tileInfo.i,
              j: tileInfo.j
          });
          OpenLayers.Util.applyDefaults(params, this.vendorParams);
          return {
              url: OpenLayers.Util.isArray(layer.url) ? layer.url[0] : layer.url,
              params: OpenLayers.Util.upperCaseObject(params),
              callback: function(request) {
                  this.handleResponse(xy, request, layer);
              },
              scope: this
          };
      }
docs: Method: buildRequestOptions
  Build an object with the relevant options for the GetFeatureInfo request.
  
  Parameters:
  layer - {<OpenLayers.Layer.WMTS>} A WMTS layer.
  xy - {<OpenLayers.Pixel>} The position on the map where the
  mouse event occurred.