Add getLocation logic.