add overzoom
start implement different densities git-svn-id: https://osmand.googlecode.com/svn/trunk@413 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
parent
fe0d12fb96
commit
0c0d15f2f5
7 changed files with 39 additions and 22 deletions
|
@ -10,10 +10,11 @@ public class ToDoConstants {
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
// 78. Add ruler to the main tile view (100m, 200m,...)
|
// 78. Add ruler to the main tile view (100m, 200m,...)
|
||||||
// 82. Add overzoom +2 for Mapnik (!)
|
|
||||||
// 80. Export/import favorite points
|
// 80. Export/import favorite points
|
||||||
// 81. Add some objects to POI category (1) to add them into OSM 2) to help navigation)
|
// 81. Add some objects to POI category (1) to add them into OSM 2) to help navigation)
|
||||||
// highway (?), traffic_calming (?), barrier(?), military(?-), landuse (?), office(?), man_made(?), power(?).
|
// highway (?), traffic_calming (?), barrier(?), military(?-), landuse (?), office(?), man_made(?), power(?).
|
||||||
|
// 84. Send letter to developer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Improvements
|
// Improvements
|
||||||
|
@ -24,6 +25,7 @@ public class ToDoConstants {
|
||||||
// 69. Add phone information to POI
|
// 69. Add phone information to POI
|
||||||
// 70. Show building numbers over map (require changing address index - index 2 more columns lat/lon for fast search)
|
// 70. Show building numbers over map (require changing address index - index 2 more columns lat/lon for fast search)
|
||||||
// 66. Transport routing (show next stop, total distance, show stop get out, voice) (needed ?).
|
// 66. Transport routing (show next stop, total distance, show stop get out, voice) (needed ?).
|
||||||
|
// 85. Enable on/off screen for bike navigation (?)
|
||||||
// 83. Add monitoring service to send locations to internet (?)
|
// 83. Add monitoring service to send locations to internet (?)
|
||||||
|
|
||||||
// Unscheduled (complex)
|
// Unscheduled (complex)
|
||||||
|
@ -47,6 +49,7 @@ public class ToDoConstants {
|
||||||
// BUGS Swing
|
// BUGS Swing
|
||||||
|
|
||||||
// DONE ANDROID :
|
// DONE ANDROID :
|
||||||
|
// 82. Add overzoom +2 for Mapnik
|
||||||
// 64. Traffic information - yandex traffic
|
// 64. Traffic information - yandex traffic
|
||||||
// 79. Download any WMS layer and add to swing version (add tile manager ${x}, ${y}, ${z} to swing and to android)
|
// 79. Download any WMS layer and add to swing version (add tile manager ${x}, ${y}, ${z} to swing and to android)
|
||||||
// 77. Implement upload gps track onto osm server (? not implemented yet on OSM?) -
|
// 77. Implement upload gps track onto osm server (? not implemented yet on OSM?) -
|
||||||
|
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent" android:background="@drawable/background_rot">
|
android:layout_height="fill_parent" android:background="@drawable/background">
|
||||||
<TableLayout android:layout_gravity="center"
|
<TableLayout android:layout_gravity="center_vertical"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<Button
|
<Button
|
||||||
|
@ -13,8 +13,11 @@
|
||||||
android:background="@drawable/btn_orange"
|
android:background="@drawable/btn_orange"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:layout_width="180dip"
|
android:layout_weight="0.5"
|
||||||
android:layout_height="70dip"
|
android:layout_marginLeft="1dp"
|
||||||
|
android:layout_marginRight="2dp"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="80dip"
|
||||||
android:drawableLeft="@drawable/map"/>
|
android:drawableLeft="@drawable/map"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
@ -23,8 +26,11 @@
|
||||||
android:background="@drawable/btn_orange"
|
android:background="@drawable/btn_orange"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:layout_width="180dip"
|
android:layout_weight="0.5"
|
||||||
android:layout_height="70dip"
|
android:layout_marginLeft="1dp"
|
||||||
|
android:layout_marginRight="2dp"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="80dip"
|
||||||
android:drawableLeft="@drawable/find"/>
|
android:drawableLeft="@drawable/find"/>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
|
@ -34,8 +40,11 @@
|
||||||
android:background="@drawable/btn_orange"
|
android:background="@drawable/btn_orange"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:layout_width="180dip"
|
android:layout_marginLeft="1dp"
|
||||||
android:layout_height="70dip"
|
android:layout_weight="0.5"
|
||||||
|
android:layout_marginRight="2dp"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="80dip"
|
||||||
android:drawableLeft="@drawable/favorites"/>
|
android:drawableLeft="@drawable/favorites"/>
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/SettingsButton"
|
android:id="@+id/SettingsButton"
|
||||||
|
@ -43,8 +52,11 @@
|
||||||
android:background="@drawable/btn_orange"
|
android:background="@drawable/btn_orange"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:layout_width="180dip"
|
android:layout_weight="0.5"
|
||||||
android:layout_height="70dip"
|
android:layout_marginLeft="2dp"
|
||||||
|
android:layout_marginRight="1dp"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="80dip"
|
||||||
android:drawableLeft="@drawable/settings"/>
|
android:drawableLeft="@drawable/settings"/>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableLayout>
|
</TableLayout>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
<TextView android:id="@+id/poidistance_label"
|
<TextView android:id="@+id/poidistance_label"
|
||||||
android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center"
|
android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center"
|
||||||
android:textSize="22px" android:maxWidth="80dp" android:minWidth="80dp"/>
|
android:textSize="22sp" android:maxWidth="80sp" android:minWidth="80sp"/>
|
||||||
<TextView android:id="@+id/poi_label" android:layout_width="wrap_content"
|
<TextView android:id="@+id/poi_label" android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" android:textSize="22px" />
|
android:layout_height="wrap_content" android:textSize="22px" />
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView android:id="@+id/folder_icon" android:layout_width="25px"
|
<ImageView android:id="@+id/folder_icon" android:layout_width="25dip"
|
||||||
android:paddingLeft="2px" android:paddingRight="2px"
|
android:paddingLeft="2px" android:paddingRight="2px"
|
||||||
android:paddingTop="2px" android:layout_height="fill_parent" />
|
android:paddingTop="2px" android:layout_height="fill_parent" />
|
||||||
<TextView android:id="@+id/folder_label" android:layout_width="wrap_content"
|
<TextView android:id="@+id/folder_label" android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" android:textSize="25px" />
|
android:layout_height="wrap_content" android:textSize="25sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="poi_namefinder_query_empty">Input search query to find POI</string>
|
<string name="poi_namefinder_query_empty">Input search query to find POI</string>
|
||||||
<string name="any_poi">Any</string>
|
<string name="any_poi">Any</string>
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
<string name="search_history_street">Straße: {0}, {1}</string>
|
<string name="search_history_street">Straße: {0}, {1}</string>
|
||||||
<string name="search_history_int_streets">Querstraße : {0} x {1} in {2}</string>
|
<string name="search_history_int_streets">Querstraße : {0} x {1} in {2}</string>
|
||||||
<string name="search_history_building">Gebäude: {0}, {1}, {2}</string>
|
<string name="search_history_building">Gebäude: {0}, {1}, {2}</string>
|
||||||
<string name="search_history_navigate_to">Navigiere zu {0}'N {1}'O</string>
|
<string name="search_history_navigate_to">Navigiere zu {0}\'N {1}\'O</string>
|
||||||
<string name="favorite">Favoriten</string>
|
<string name="favorite">Favoriten</string>
|
||||||
<string name="clear_all">Alles löschen</string>
|
<string name="clear_all">Alles löschen</string>
|
||||||
<string name="history">Verlauf</string>
|
<string name="history">Verlauf</string>
|
||||||
|
|
|
@ -46,6 +46,8 @@ import com.osmand.views.MultiTouchSupport.MultiTouchZoomListener;
|
||||||
public class OsmandMapTileView extends SurfaceView implements IMapDownloaderCallback,
|
public class OsmandMapTileView extends SurfaceView implements IMapDownloaderCallback,
|
||||||
Callback, AnimateDraggingCallback, OnGestureListener, OnDoubleTapListener, MultiTouchZoomListener {
|
Callback, AnimateDraggingCallback, OnGestureListener, OnDoubleTapListener, MultiTouchZoomListener {
|
||||||
|
|
||||||
|
public static final int OVERZOOM_IN = 2;
|
||||||
|
|
||||||
protected final int emptyTileDivisor = 16;
|
protected final int emptyTileDivisor = 16;
|
||||||
protected final int timeForDraggingAnimation = 300;
|
protected final int timeForDraggingAnimation = 300;
|
||||||
protected final int minimumDistanceForDraggingAnimation = 40;
|
protected final int minimumDistanceForDraggingAnimation = 40;
|
||||||
|
@ -225,7 +227,7 @@ public class OsmandMapTileView extends SurfaceView implements IMapDownloaderCall
|
||||||
|
|
||||||
|
|
||||||
public void setZoom(float zoom){
|
public void setZoom(float zoom){
|
||||||
if (map == null || (map.getMaximumZoomSupported() >= zoom && map.getMinimumZoomSupported() <= zoom)) {
|
if (map == null || ((map.getMaximumZoomSupported() + OVERZOOM_IN) >= zoom && map.getMinimumZoomSupported() <= zoom)) {
|
||||||
animatedDraggingThread.stopAnimating();
|
animatedDraggingThread.stopAnimating();
|
||||||
this.zoom = zoom;
|
this.zoom = zoom;
|
||||||
refreshMap();
|
refreshMap();
|
||||||
|
@ -235,7 +237,7 @@ public class OsmandMapTileView extends SurfaceView implements IMapDownloaderCall
|
||||||
// for internal usage
|
// for internal usage
|
||||||
@Override
|
@Override
|
||||||
public void zoomTo(float zoom, boolean notify) {
|
public void zoomTo(float zoom, boolean notify) {
|
||||||
if (map == null || (map.getMaximumZoomSupported() >= zoom && map.getMinimumZoomSupported() <= zoom)) {
|
if (map == null || ((map.getMaximumZoomSupported() + OVERZOOM_IN) >= zoom && map.getMinimumZoomSupported() <= zoom)) {
|
||||||
this.zoom = zoom;
|
this.zoom = zoom;
|
||||||
refreshMap();
|
refreshMap();
|
||||||
if(notify && locationListener != null){
|
if(notify && locationListener != null){
|
||||||
|
@ -272,8 +274,8 @@ public class OsmandMapTileView extends SurfaceView implements IMapDownloaderCall
|
||||||
|
|
||||||
public void setMap(ITileSource map) {
|
public void setMap(ITileSource map) {
|
||||||
this.map = map;
|
this.map = map;
|
||||||
if(map.getMaximumZoomSupported() < this.zoom){
|
if(map.getMaximumZoomSupported() + OVERZOOM_IN < this.zoom){
|
||||||
zoom = map.getMaximumZoomSupported();
|
zoom = map.getMaximumZoomSupported() + OVERZOOM_IN;
|
||||||
}
|
}
|
||||||
if(map.getMinimumZoomSupported() > this.zoom){
|
if(map.getMinimumZoomSupported() > this.zoom){
|
||||||
zoom = map.getMinimumZoomSupported();
|
zoom = map.getMinimumZoomSupported();
|
||||||
|
@ -428,7 +430,7 @@ public class OsmandMapTileView extends SurfaceView implements IMapDownloaderCall
|
||||||
if (canvas != null) {
|
if (canvas != null) {
|
||||||
ResourceManager mgr = ResourceManager.getResourceManager();
|
ResourceManager mgr = ResourceManager.getResourceManager();
|
||||||
boolean useInternet = OsmandSettings.isUsingInternetToDownloadTiles(getContext()) && map.couldBeDownloadedFromInternet();
|
boolean useInternet = OsmandSettings.isUsingInternetToDownloadTiles(getContext()) && map.couldBeDownloadedFromInternet();
|
||||||
int maxLevel = OsmandSettings.getMaximumLevelToDownloadTile(getContext());
|
int maxLevel = Math.min(OsmandSettings.getMaximumLevelToDownloadTile(getContext()), map.getMaximumZoomSupported());
|
||||||
canvas.save();
|
canvas.save();
|
||||||
canvas.rotate(rotate, w , h);
|
canvas.rotate(rotate, w , h);
|
||||||
boundsRect.set(0, 0, getWidth(), getHeight());
|
boundsRect.set(0, 0, getWidth(), getHeight());
|
||||||
|
|
Loading…
Reference in a new issue