Back to project page PharmaApp.
The source code is released under:
MIT License
If you think the Android project PharmaApp listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package mobi.pharmaapp.models; /*from w w w.j a v a2 s . c o m*/ import com.google.android.maps.GeoPoint; import mobi.pharmaapp.util.LocalConstants; import mobi.pharmaapp.util.Location; /** * * @author see /AUTHORS */ public class UserModel { private GeoPoint curLoc; private static final UserModel userModel = new UserModel(); private UserModel() { curLoc = LocalConstants.INITIAL_USER_LOCATION; } public static UserModel getInstance() { return userModel; } public Location getCurrentLocation() { return new Location((float) curLoc.getLatitudeE6() / 1000000, (float) curLoc.getLongitudeE6() / 1000000); } public void setCurrentLocation(GeoPoint l) { curLoc = l; } public void setCurrentLocation(double lat, double lon) { curLoc = new GeoPoint((int) (lat * 1000000), (int) (lon * 1000000)); } }