public void findMe() { if (mapController.getLocation() != null) { addLocationDot(); if (followMe || !initialRelocateHappened) { // TODO find ways to accomplish this without two flags ;( mapController.resetMapForUser(); initialRelocateHappened = true; getMap().setMapPosition(getUserLocationPosition()); } updateMap(); } }
public GeoPoint getUserLocationPoint() { Location userLocation = mapController.getLocation(); return new GeoPoint(userLocation.getLatitude(), userLocation.getLongitude()); }