fix some issues
git-svn-id: https://osmand.googlecode.com/svn/trunk@97 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
parent
72bb0e9fd4
commit
0515b1af84
2 changed files with 16 additions and 12 deletions
|
@ -15,13 +15,14 @@ public class ToDoConstants {
|
|||
// TODO ANDROID
|
||||
// 25. POI search near to map location (show categories & type). Second cut. (implement incremental search)
|
||||
|
||||
// 3. Revise osmand UI. Preparing new icons (revise UI 18, 2, ).
|
||||
// 3. Revise osmand UI. Preparing new icons (revise UI 18, 2, ). Main application icon, back to location icon.
|
||||
// 13. Save point as favorite & introduce favorite points dialog
|
||||
// 14. Show zoom level on map
|
||||
|
||||
// 24. Implement ResourceManager, load cities/streets/buildings on Low memory (clear previous all addresses cities).
|
||||
// 5. Search for city/streets/buildings
|
||||
// 15. Investigate interruption of any long running operation & implement where it is needed
|
||||
// 15. Investigate interruption of any long running operation & implement where it is needed.
|
||||
// Fix progress information (loading indices).
|
||||
// 21. Implement zooming tile (if tile doesn't exist local, we can zoom in previous tile).
|
||||
|
||||
// 8. Enable change POI directly on map (requires OSM login)
|
||||
|
@ -29,14 +30,11 @@ public class ToDoConstants {
|
|||
// 20. Implement save track/route to gpx (?)
|
||||
|
||||
// FIXME Bugs Android :
|
||||
// 0. FIX TODO for partial loading rotated map
|
||||
// 1. When firstly run osmand navigation (from notification bar) show map & go to menu shows desktop.
|
||||
// No chance to close application
|
||||
// 3. Fix progress information (loading indices) for android version
|
||||
// 4. Fix when POI selected & enable button backToLocation
|
||||
// 5. Call ResourceManager.close when it is needed
|
||||
// 6. Understand concept of application where to save/restore global setting.
|
||||
// (for example reset navigate to point, reset link map with location). It should be reset after user call exit.
|
||||
// Call ResourceManager.close when it is needed.
|
||||
// 8. Introduce activity search by location (unify with existing dialog)
|
||||
// 9. When all features will be ready we can remove show location from context menu
|
||||
|
||||
|
|
|
@ -97,11 +97,7 @@ public class MapActivity extends Activity implements LocationListener, IMapLocat
|
|||
}
|
||||
|
||||
SharedPreferences prefs = getSharedPreferences(OsmandSettings.SHARED_PREFERENCES_NAME, MODE_WORLD_READABLE);
|
||||
if(prefs != null && prefs.contains(OsmandSettings.LAST_KNOWN_MAP_LAT)){
|
||||
LatLon l = OsmandSettings.getLastKnownMapLocation(this);
|
||||
mapView.setLatLon(l.getLatitude(), l.getLongitude());
|
||||
mapView.setZoom(OsmandSettings.getLastKnownMapZoom(this));
|
||||
} else {
|
||||
if(prefs == null || !prefs.contains(OsmandSettings.LAST_KNOWN_MAP_LAT)){
|
||||
LocationManager service = (LocationManager) getSystemService(LOCATION_SERVICE);
|
||||
Location location = service.getLastKnownLocation(LocationManager.GPS_PROVIDER);
|
||||
if(location != null){
|
||||
|
@ -126,7 +122,6 @@ public class MapActivity extends Activity implements LocationListener, IMapLocat
|
|||
}
|
||||
});
|
||||
backToLocation = (ImageButton)findViewById(R.id.BackToLocation);
|
||||
backToLocation.setVisibility(View.INVISIBLE);
|
||||
backToLocation.setOnClickListener(new OnClickListener(){
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -278,6 +273,17 @@ public class MapActivity extends Activity implements LocationListener, IMapLocat
|
|||
mapView.setRotate(0);
|
||||
}
|
||||
mapView.setMapPosition(OsmandSettings.getPositionOnMap(this));
|
||||
SharedPreferences prefs = getSharedPreferences(OsmandSettings.SHARED_PREFERENCES_NAME, MODE_WORLD_READABLE);
|
||||
if(prefs != null && prefs.contains(OsmandSettings.LAST_KNOWN_MAP_LAT)){
|
||||
LatLon l = OsmandSettings.getLastKnownMapLocation(this);
|
||||
mapView.setLatLon(l.getLatitude(), l.getLongitude());
|
||||
mapView.setZoom(OsmandSettings.getLastKnownMapZoom(this));
|
||||
}
|
||||
if(getLastKnownLocation() != null){
|
||||
backToLocation.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
backToLocation.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
|
||||
if(mapView.getLayers().contains(poiMapLayer) != OsmandSettings.isShowingPoiOverMap(this)){
|
||||
|
|
Loading…
Reference in a new issue