Ignore:
Timestamp:
2018-06-04T15:15:07+02:00 (6 years ago)
Author:
biswesh
Message:

check for bicycle mode of travel improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/actions/EdgeSelectionAction.java

    r34246 r34249  
    111111                        return RouteUtils.isWaySuitableForBuses(way);
    112112
    113                 if ("bicycle".equals(modeOfTravel))
    114                         return RouteUtils.isWaySuitableForBicycle(way);
     113                if ("bicycle".equals(modeOfTravel)) {
     114                        if (way.hasTag("bicycle", "yes"))
     115                                return true;
     116                        if (way.hasTag("bicycle", "no") || way.hasTag("bicycle", "side_path"))
     117                                return false;
     118                        if (way.hasTag("highway", "motorway") || way.hasTag("highway", "trunk") || way.hasTag("highway", "footway")
     119                                        || way.hasTag("highway", "pedestrian"))
     120                                return false;
     121
     122                        return true;
     123                }
    115124
    116125                if ("foot".equals(modeOfTravel)) {
    117                         return way.hasTag("highway", "footway") || !(way.hasKey("highway", "motorway") || way.hasKey("foot", "no")
    118                                         || way.hasKey("foot", "use_sidepath"));
     126                        return (way.hasTag("highway", "footway") || !(way.hasKey("highway", "motorway") || way.hasKey("foot", "no")
     127                                        || way.hasKey("foot", "use_sidepath")));
    119128                }
    120129
Note: See TracChangeset for help on using the changeset viewer.