moved panTo into getCurrentPosition