fix bugs
git-svn-id: https://osmand.googlecode.com/svn/trunk@137 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
parent
c33c6e4b8f
commit
c0efd98ff6
2 changed files with 4 additions and 2 deletions
|
@ -54,6 +54,7 @@ public class Amenity extends MapObject {
|
||||||
prebuiltMap.put("bus_station", AmenityType.TRANSPORTATION);
|
prebuiltMap.put("bus_station", AmenityType.TRANSPORTATION);
|
||||||
prebuiltMap.put("car_rental", AmenityType.TRANSPORTATION);
|
prebuiltMap.put("car_rental", AmenityType.TRANSPORTATION);
|
||||||
prebuiltMap.put("car_sharing", AmenityType.TRANSPORTATION);
|
prebuiltMap.put("car_sharing", AmenityType.TRANSPORTATION);
|
||||||
|
prebuiltMap.put("fuel", AmenityType.TRANSPORTATION);
|
||||||
prebuiltMap.put("car_wash", AmenityType.TRANSPORTATION);
|
prebuiltMap.put("car_wash", AmenityType.TRANSPORTATION);
|
||||||
prebuiltMap.put("grit_bin", AmenityType.TRANSPORTATION);
|
prebuiltMap.put("grit_bin", AmenityType.TRANSPORTATION);
|
||||||
prebuiltMap.put("parking", AmenityType.TRANSPORTATION);
|
prebuiltMap.put("parking", AmenityType.TRANSPORTATION);
|
||||||
|
|
|
@ -44,6 +44,7 @@ public class SearchPOIActivity extends ListActivity {
|
||||||
private Button searchPOILevel;
|
private Button searchPOILevel;
|
||||||
private final static int maxCount = 100;
|
private final static int maxCount = 100;
|
||||||
private final static int finalZoom = 8;
|
private final static int finalZoom = 8;
|
||||||
|
private final static int limitOfClosest = 30;
|
||||||
private int zoom = 13;
|
private int zoom = 13;
|
||||||
|
|
||||||
private AmenityType amenityType;
|
private AmenityType amenityType;
|
||||||
|
@ -86,13 +87,13 @@ public class SearchPOIActivity extends ListActivity {
|
||||||
.getLongitude(), zoom, maxCount);
|
.getLongitude(), zoom, maxCount);
|
||||||
} else {
|
} else {
|
||||||
amenityList = resourceManager.searchAmenities(amenityType, lastKnownMapLocation.getLatitude(), lastKnownMapLocation
|
amenityList = resourceManager.searchAmenities(amenityType, lastKnownMapLocation.getLatitude(), lastKnownMapLocation
|
||||||
.getLongitude(), zoom, maxCount);
|
.getLongitude(), zoom + 2, maxCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (amenityList != null) {
|
if (amenityList != null) {
|
||||||
MapUtils.sortListOfMapObject(amenityList, lastKnownMapLocation.getLatitude(), lastKnownMapLocation.getLongitude());
|
MapUtils.sortListOfMapObject(amenityList, lastKnownMapLocation.getLatitude(), lastKnownMapLocation.getLongitude());
|
||||||
if(amenityType == null){
|
if(amenityType == null){
|
||||||
while (amenityList.size() > 30) {
|
while (amenityList.size() > limitOfClosest) {
|
||||||
amenityList.remove(amenityList.size() - 1);
|
amenityList.remove(amenityList.size() - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue