I made a mistake above. Make another `Cartographic` outside the function to use as a result for `getCenter`.