How to get the location in OpenMRS

Is this of help? How to get current location

Or this? How to get a user login location