issue 89
and issue zoom buttons git-svn-id: https://osmand.googlecode.com/svn/trunk@564 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
parent
d70329b368
commit
565e6659b3
4 changed files with 28 additions and 19 deletions
|
@ -1,7 +1,5 @@
|
||||||
package net.osmand.osm.io;
|
package net.osmand.osm.io;
|
||||||
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
|
@ -19,7 +17,6 @@ import javax.xml.parsers.SAXParser;
|
||||||
import javax.xml.parsers.SAXParserFactory;
|
import javax.xml.parsers.SAXParserFactory;
|
||||||
|
|
||||||
import net.osmand.IProgress;
|
import net.osmand.IProgress;
|
||||||
import net.osmand.impl.ConsoleProgressImplementation;
|
|
||||||
import net.osmand.osm.Entity;
|
import net.osmand.osm.Entity;
|
||||||
import net.osmand.osm.EntityInfo;
|
import net.osmand.osm.EntityInfo;
|
||||||
import net.osmand.osm.Node;
|
import net.osmand.osm.Node;
|
||||||
|
@ -27,7 +24,6 @@ import net.osmand.osm.Relation;
|
||||||
import net.osmand.osm.Way;
|
import net.osmand.osm.Way;
|
||||||
import net.osmand.osm.Entity.EntityId;
|
import net.osmand.osm.Entity.EntityId;
|
||||||
import net.osmand.osm.Entity.EntityType;
|
import net.osmand.osm.Entity.EntityType;
|
||||||
import net.osmand.osm.OSMSettings.OSMTagKey;
|
|
||||||
|
|
||||||
import org.xml.sax.Attributes;
|
import org.xml.sax.Attributes;
|
||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
|
|
|
@ -9,15 +9,21 @@
|
||||||
|
|
||||||
<net.osmand.views.OsmZoomControls android:id="@+id/ZoomControls"
|
<net.osmand.views.OsmZoomControls android:id="@+id/ZoomControls"
|
||||||
android:layout_marginRight="3dp" android:layout_marginBottom="2dp"
|
android:layout_marginRight="3dp" android:layout_marginBottom="2dp"
|
||||||
android:layout_width="100dp" android:layout_height="wrap_content" android:layout_gravity="bottom|right"/>
|
android:layout_width="120dp" android:layout_height="wrap_content" android:layout_gravity="bottom|right"/>
|
||||||
|
|
||||||
|
|
||||||
<ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|left" android:id="@+id/BackToMenu" android:background="@drawable/back_menu"></ImageButton>
|
|
||||||
<ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="top|right" android:layout_marginTop="64dp" android:id="@+id/BackToLocation" android:background="@drawable/back_location"></ImageButton>
|
<ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="top|right" android:layout_marginTop="64dp" android:id="@+id/BackToLocation" android:background="@drawable/back_location"></ImageButton>
|
||||||
|
|
||||||
<LinearLayout android:layout_width="wrap_content" android:id="@+id/RouteLayout" android:orientation="horizontal" android:layout_height="wrap_content" android:layout_gravity="bottom|center" android:layout_marginBottom="12dp">
|
<ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|left" android:id="@+id/BackToMenu" android:background="@drawable/back_menu"/>
|
||||||
<Button android:layout_width="wrap_content" android:id="@+id/PreviousButton" android:layout_height="wrap_content" android:background="@android:drawable/ic_media_previous"/>
|
<LinearLayout android:layout_width="wrap_content" android:id="@+id/RouteLayout" android:orientation="horizontal" android:layout_height="wrap_content"
|
||||||
<Button android:layout_width="wrap_content" android:id="@+id/InfoButton" android:layout_height="wrap_content" android:background="@android:drawable/ic_dialog_info" android:layout_marginLeft="8dp"/>
|
android:layout_marginBottom="12dp" android:layout_gravity="bottom|center" >
|
||||||
<Button android:layout_width="wrap_content" android:id="@+id/NextButton" android:layout_height="wrap_content" android:background="@android:drawable/ic_media_next" android:layout_marginLeft="8dp" android:layout_marginRight="15dp"/>
|
|
||||||
|
<Button android:layout_width="wrap_content" android:id="@+id/PreviousButton" android:layout_height="wrap_content" android:background="@android:drawable/ic_media_previous"
|
||||||
|
/>
|
||||||
|
<Button android:layout_width="wrap_content" android:id="@+id/InfoButton" android:layout_height="wrap_content" android:background="@android:drawable/ic_dialog_info"
|
||||||
|
android:layout_marginLeft="8dp"/>
|
||||||
|
<Button android:layout_width="wrap_content" android:id="@+id/NextButton" android:layout_height="wrap_content" android:background="@android:drawable/ic_media_next"
|
||||||
|
android:layout_marginLeft="8dp" android:layout_marginRight="55dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
|
@ -1432,11 +1432,9 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
|
||||||
list.add(getString(R.string.any_poi));
|
list.add(getString(R.string.any_poi));
|
||||||
|
|
||||||
final PoiFiltersHelper poiFilters = ((OsmandApplication)getApplication()).getPoiFilters();
|
final PoiFiltersHelper poiFilters = ((OsmandApplication)getApplication()).getPoiFilters();
|
||||||
for(PoiFilter f : poiFilters.getUserDefinedPoiFilters()){
|
for (PoiFilter f : poiFilters.getUserDefinedPoiFilters()) {
|
||||||
if (!f.getFilterId().equals(PoiFilter.CUSTOM_FILTER_ID)) {
|
userDefined.add(f);
|
||||||
userDefined.add(f);
|
list.add(f.getName());
|
||||||
list.add(f.getName());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for(AmenityType t : AmenityType.values()){
|
for(AmenityType t : AmenityType.values()){
|
||||||
list.add(AmenityType.toPublicString(t));
|
list.add(AmenityType.toPublicString(t));
|
||||||
|
@ -1454,9 +1452,17 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
|
||||||
} else {
|
} else {
|
||||||
filterId = PoiFiltersHelper.getOsmDefinedFilterId(AmenityType.values()[which - userDefined.size() - 1]);
|
filterId = PoiFiltersHelper.getOsmDefinedFilterId(AmenityType.values()[which - userDefined.size() - 1]);
|
||||||
}
|
}
|
||||||
OsmandSettings.setPoiFilterForMap(MapActivity.this, filterId);
|
if(filterId.equals(PoiFilter.CUSTOM_FILTER_ID)){
|
||||||
poiMapLayer.setFilter(poiFilters.getFilterById(filterId));
|
Intent newIntent = new Intent(MapActivity.this, EditPOIFilterActivity.class);
|
||||||
mapView.refreshMap();
|
newIntent.putExtra(EditPOIFilterActivity.AMENITY_FILTER, filterId);
|
||||||
|
newIntent.putExtra(EditPOIFilterActivity.SEARCH_LAT, mapView.getLatitude());
|
||||||
|
newIntent.putExtra(EditPOIFilterActivity.SEARCH_LON, mapView.getLongitude());
|
||||||
|
startActivity(newIntent);
|
||||||
|
} else {
|
||||||
|
OsmandSettings.setPoiFilterForMap(MapActivity.this, filterId);
|
||||||
|
poiMapLayer.setFilter(poiFilters.getFilterById(filterId));
|
||||||
|
mapView.refreshMap();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -164,11 +164,12 @@ public class RouteInfoLayer implements OsmandMapLayer, IRouteInformationListener
|
||||||
textBorder = new RectF(-2, -1, textSize + 2, 0);
|
textBorder = new RectF(-2, -1, textSize + 2, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final int shiftCenter = 55;
|
||||||
@Override
|
@Override
|
||||||
public void onDraw(Canvas canvas, RectF latLonBounds) {
|
public void onDraw(Canvas canvas, RectF latLonBounds) {
|
||||||
if(isVisible()){
|
if(isVisible()){
|
||||||
border.set(layout.getLeft() - 10 * dm.density, layout.getTop() - 4 * dm.density,
|
border.set(layout.getLeft() - 10 * dm.density, layout.getTop() - 4 * dm.density,
|
||||||
layout.getRight() - 5 * dm.density, layout.getBottom() + 4 * dm.density);
|
layout.getRight() - (shiftCenter - 5) * dm.density, layout.getBottom() + 4 * dm.density);
|
||||||
canvas.drawRoundRect(border, 5 * dm.density, 5 * dm.density, paintBorder);
|
canvas.drawRoundRect(border, 5 * dm.density, 5 * dm.density, paintBorder);
|
||||||
canvas.drawRoundRect(border, 5 * dm.density, 5 * dm.density, paintBlack);
|
canvas.drawRoundRect(border, 5 * dm.density, 5 * dm.density, paintBlack);
|
||||||
List<RouteDirectionInfo> dir = routingHelper.getRouteDirections();
|
List<RouteDirectionInfo> dir = routingHelper.getRouteDirections();
|
||||||
|
|
Loading…
Reference in a new issue