From c0efd98ff60b4d35673d945c815c4e390fb25767 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Fri, 4 Jun 2010 09:33:31 +0000 Subject: [PATCH] fix bugs git-svn-id: https://osmand.googlecode.com/svn/trunk@137 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8 --- DataExtractionOSM/src/com/osmand/data/Amenity.java | 1 + .../src/com/osmand/activities/search/SearchPOIActivity.java | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DataExtractionOSM/src/com/osmand/data/Amenity.java b/DataExtractionOSM/src/com/osmand/data/Amenity.java index 07cbfca642..bdb3ad6e09 100644 --- a/DataExtractionOSM/src/com/osmand/data/Amenity.java +++ b/DataExtractionOSM/src/com/osmand/data/Amenity.java @@ -54,6 +54,7 @@ public class Amenity extends MapObject { prebuiltMap.put("bus_station", AmenityType.TRANSPORTATION); prebuiltMap.put("car_rental", AmenityType.TRANSPORTATION); prebuiltMap.put("car_sharing", AmenityType.TRANSPORTATION); + prebuiltMap.put("fuel", AmenityType.TRANSPORTATION); prebuiltMap.put("car_wash", AmenityType.TRANSPORTATION); prebuiltMap.put("grit_bin", AmenityType.TRANSPORTATION); prebuiltMap.put("parking", AmenityType.TRANSPORTATION); diff --git a/OsmAnd/src/com/osmand/activities/search/SearchPOIActivity.java b/OsmAnd/src/com/osmand/activities/search/SearchPOIActivity.java index 17b1f5cf58..b34affa7bb 100644 --- a/OsmAnd/src/com/osmand/activities/search/SearchPOIActivity.java +++ b/OsmAnd/src/com/osmand/activities/search/SearchPOIActivity.java @@ -44,6 +44,7 @@ public class SearchPOIActivity extends ListActivity { private Button searchPOILevel; private final static int maxCount = 100; private final static int finalZoom = 8; + private final static int limitOfClosest = 30; private int zoom = 13; private AmenityType amenityType; @@ -86,13 +87,13 @@ public class SearchPOIActivity extends ListActivity { .getLongitude(), zoom, maxCount); } else { amenityList = resourceManager.searchAmenities(amenityType, lastKnownMapLocation.getLatitude(), lastKnownMapLocation - .getLongitude(), zoom, maxCount); + .getLongitude(), zoom + 2, maxCount); } if (amenityList != null) { MapUtils.sortListOfMapObject(amenityList, lastKnownMapLocation.getLatitude(), lastKnownMapLocation.getLongitude()); if(amenityType == null){ - while (amenityList.size() > 30) { + while (amenityList.size() > limitOfClosest) { amenityList.remove(amenityList.size() - 1); } }