This commit is contained in:
Alexey Kulish 2016-09-22 17:27:50 +03:00
parent cec52a53e8
commit 5f5e574ac5

View file

@ -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;
}