Fix #3106
This commit is contained in:
parent
cec52a53e8
commit
5f5e574ac5
1 changed files with 19 additions and 14 deletions
|
@ -113,7 +113,14 @@ public class ContextMenuLayer extends OsmandMapLayer {
|
|||
paint = new Paint();
|
||||
pressedBitmap = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_shield_tap);
|
||||
pressedBitmapSmall = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_shield_tap_small);
|
||||
}
|
||||
|
||||
public boolean isVisible() {
|
||||
return menu.isActive();
|
||||
}
|
||||
|
||||
private List<String> getPublicTransportTypes() {
|
||||
if (publicTransportTypes == null) {
|
||||
publicTransportTypes = new ArrayList<>();
|
||||
List<PoiFilter> filters = activity.getMyApplication().getPoiTypes().getPoiCategoryByName("transportation").getPoiFilters();
|
||||
for (PoiFilter poiFilter : filters) {
|
||||
|
@ -127,9 +134,7 @@ public class ContextMenuLayer extends OsmandMapLayer {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isVisible() {
|
||||
return menu.isActive();
|
||||
return publicTransportTypes;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -681,7 +686,7 @@ public class ContextMenuLayer extends OsmandMapLayer {
|
|||
}
|
||||
}
|
||||
|
||||
if (res != null && publicTransportTypes.contains(res.getSubType())) {
|
||||
if (res != null && getPublicTransportTypes().contains(res.getSubType())) {
|
||||
return findNearestTransportStop(lat, lon) == null ? res : null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue