From 63e1ffbf1d16fc901b0e903637312ebd03c6c27f Mon Sep 17 00:00:00 2001 From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com> Date: Thu, 8 Apr 2021 16:59:34 +0300 Subject: [PATCH] First two item done --- .../src/net/osmand/plus/mapcontextmenu/MenuBuilder.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java index c83a5d9069..788f74ad07 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java @@ -1235,8 +1235,6 @@ public class MenuBuilder { public void onClick(View v) { LatLon latLon = new LatLon(poi.getLocation().getLatitude(), poi.getLocation().getLongitude()); mapActivity.getContextMenu().show(latLon, pointDescription, poi); - mapActivity.getContextMenu().update(latLon, pointDescription, poi); - mapActivity.setMapLocation(poi.getLocation().getLatitude(), poi.getLocation().getLongitude()); } }); view.addView(button); @@ -1400,8 +1398,7 @@ public class MenuBuilder { } private List getSortedAmenities(PoiUIFilter filter, final LatLon latLon) { - boolean isWikiFilter = filter.getFilterId().equals("std_osmwiki"); - QuadRect rect = MapUtils.calculateLatLonBbox(latLon.getLatitude(), latLon.getLongitude(), isWikiFilter ? 250 : 1000); + QuadRect rect = MapUtils.calculateLatLonBbox(latLon.getLatitude(), latLon.getLongitude(), 250); List nearestAmenities = getAmenities(rect, filter); nearestAmenities.remove(amenity); @@ -1414,11 +1411,7 @@ public class MenuBuilder { return Double.compare(d1, d2); } }); - if (isWikiFilter) { return nearestAmenities; - } else { - return nearestAmenities.subList(0, Math.min(10, nearestAmenities.size())); - } } private List getAmenities(QuadRect rect, PoiUIFilter filter) {