更改getLocation function has parameter (success)