We consider a mobile energy harvesting transmitter where movement is motivated by finding better energy harvesting locations. Movement comes with an energy cost expenditure, and hence there exists a tradeoff between staying at the same location and moving to a new one. On one hand, the transmitter may opt not to move and use all its available energy for transmission; on the other hand, it can choose to move to a potentially better location, spending some of its available energy during the movement process, and yet harvest larger amounts of energy at the new location and achieve higher throughput. In this paper, we characterize this tradeoff by designing throughput-optimal power allocation policies subject to energy causality constraints and moving costs. In our setup, the transmitter moves along a straight line, where two energy sources are located at the opposite ends of the line. We first study the case of a single energy arrival at both sources, and then generalize it to the case of multiple energy arrivals.