diff --git a/OsmAnd/res/layout/main.xml b/OsmAnd/res/layout/main.xml index 488a6351c6..2ea9df1cac 100644 --- a/OsmAnd/res/layout/main.xml +++ b/OsmAnd/res/layout/main.xml @@ -4,9 +4,9 @@ android:layout_width="fill_parent" android:layout_height="fill_parent"> +> - diff --git a/OsmAnd/res/layout/menu.xml b/OsmAnd/res/layout/menu.xml index c574222563..335c2df948 100644 --- a/OsmAnd/res/layout/menu.xml +++ b/OsmAnd/res/layout/menu.xml @@ -1,44 +1,55 @@ - - - + android:layout_width="180dip" + android:layout_height="70dip" + android:drawableLeft="@drawable/map"/> - - - - - + + + + - - - - + diff --git a/OsmAnd/src/com/osmand/activities/MapActivity.java b/OsmAnd/src/com/osmand/activities/MapActivity.java index 40b78214a4..7731981cd4 100644 --- a/OsmAnd/src/com/osmand/activities/MapActivity.java +++ b/OsmAnd/src/com/osmand/activities/MapActivity.java @@ -121,7 +121,7 @@ public class MapActivity extends Activity implements LocationListener, IMapLocat - ZoomControls zoomControls = (ZoomControls) findViewById(R.id.ZoomControls01); + ZoomControls zoomControls = (ZoomControls) findViewById(R.id.ZoomControls); zoomControls.setOnZoomInClickListener(new OnClickListener() { @Override public void onClick(View v) { diff --git a/OsmAnd/src/com/osmand/views/OsmZoomControls.java b/OsmAnd/src/com/osmand/views/OsmZoomControls.java new file mode 100644 index 0000000000..6826cb8cf2 --- /dev/null +++ b/OsmAnd/src/com/osmand/views/OsmZoomControls.java @@ -0,0 +1,31 @@ +package com.osmand.views; + +import android.content.Context; +import android.util.AttributeSet; +import android.widget.ZoomControls; + +public class OsmZoomControls extends ZoomControls { + + public OsmZoomControls(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public OsmZoomControls(Context context) { + super(context); + } + + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + // Ugly code : force buttons be equal size. + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + LayoutParams layoutParams = (android.widget.LinearLayout.LayoutParams) getChildAt(0).getLayoutParams(); + layoutParams.width = getMeasuredWidth()/ 2 ; + layoutParams = (android.widget.LinearLayout.LayoutParams) getChildAt(1).getLayoutParams(); + layoutParams.width = getMeasuredWidth()/ 2 ; + super.onMeasure(getMeasuredWidth(), getMeasuredHeight()); + + } + + + +} diff --git a/OsmAnd/src/com/osmand/views/POIMapLayer.java b/OsmAnd/src/com/osmand/views/POIMapLayer.java index a65086cf71..d844fad82b 100644 --- a/OsmAnd/src/com/osmand/views/POIMapLayer.java +++ b/OsmAnd/src/com/osmand/views/POIMapLayer.java @@ -18,7 +18,7 @@ import com.osmand.osm.MapUtils; public class POIMapLayer implements OsmandMapLayer { // it is very slow to use with 15 level - private static final int startZoom = 16; + private static final int startZoom = 15; private Paint pointAltUI; private OsmandMapTileView view; @@ -79,6 +79,8 @@ public class POIMapLayer implements OsmandMapLayer { public int getRadiusPoi(int zoom){ if(zoom < startZoom){ return 0; + } else if(zoom == 15){ + return 7; } else if(zoom == 16){ return 10; } else if(zoom == 17){