Let X be a nonsingular projective algebraic variety, and let S be a line bundle on X. Let A = (a_1,..., a_n) be a vector of integers. Consider a map f from a pointed curve (C,x_1,...,x_n) to X satisfying the following condition: the line bundle f*(S) has a meromorphic section with zeroes and poles exactly at the marked points x_i with orders prescribed by the integers a_i. A compactification of the space of maps based upon the above condition is given by the moduli space of stable maps to rubber over X. The main result of the paper is an explicit formula (in tautological classes) for the push-forward of the virtual fundamental class of the moduli space of stable maps to rubber over X via the forgetful morphism to the moduli space of stable maps to X. In case X is a point, the result here specializes to Pixtons formula for the double ramification cycle. Applications of the new formula, viewed as calculating double ramification cycles with target X, are given.