Ignore:
Timestamp:
2009-07-03T12:34:14+02:00 (15 years ago)
Author:
stoecker
Message:

adapted plugins to JOSm 1722, UtilsPlugin still has a problem

Location:
applications/editors/josm/plugins/routing
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/routing/build.xml

    r15707 r16290  
    4444                <attribute name="Plugin-Description" value="Provides routing capabilities."/>
    4545                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Routing"/>
    46                 <attribute name="Plugin-Mainversion" value="1646"/>
     46                <attribute name="Plugin-Mainversion" value="1722"/>
    4747                <attribute name="Plugin-Stage" value="50"/>
    4848                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
  • applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraph.java

    r15707 r16290  
    160160     */
    161161    private void addEdge(Way way,Node from, Node to) {
    162         double length = from.coor.greatCircleDistance(to.coor);
     162        double length = from.getCoor().greatCircleDistance(to.getCoor());
    163163
    164164        OsmEdge edge = new OsmEdge(way, from, to);
  • applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/osm/OsmEdge.java

    r15707 r16290  
    6969        this.from = from;
    7070        this.to = to;
    71         this.length = from.coor.greatCircleDistance(to.coor);
     71        this.length = from.getCoor().greatCircleDistance(to.getCoor());
    7272      }
    7373
     
    8080
    8181  public EastNorth fromEastNorth() {
    82       return this.from.eastNorth;
     82      return this.from.getEastNorth();
    8383  }
    8484
    8585  public EastNorth toEastNorth() {
    86       return this.to.eastNorth;
     86      return this.to.getEastNorth();
    8787  }
    8888
  • applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingLayer.java

    r15707 r16290  
    139139                if (n.deleted || n.incomplete) continue;
    140140
    141                 Point P = Main.map.mapView.getPoint(n.eastNorth);
     141                Point P = Main.map.mapView.getPoint(n.getEastNorth());
    142142                double dist = p.distanceSq(P);
    143143                if (dist < NavigatableComponent.snapDistance) {
     
    275275        // paint start icon
    276276        Node node = nodes.get(0);
    277         Point screen = mv.getPoint(node.eastNorth);
     277        Point screen = mv.getPoint(node.getEastNorth());
    278278        startIcon.paintIcon(mv, g, screen.x - startIcon.getIconWidth()/2,
    279279                screen.y - startIcon.getIconHeight());
     
    282282        for(int index = 1; index < nodes.size() - 1; ++index) {
    283283            node = nodes.get(index);
    284             screen = mv.getPoint(node.eastNorth);
     284            screen = mv.getPoint(node.getEastNorth());
    285285            middleIcon.paintIcon(mv, g, screen.x - startIcon.getIconWidth()/2,
    286286                    screen.y - middleIcon.getIconHeight());
     
    289289        if(nodes.size() > 1) {
    290290            node = nodes.get(nodes.size() - 1);
    291             screen = mv.getPoint(node.eastNorth);
     291            screen = mv.getPoint(node.getEastNorth());
    292292            endIcon.paintIcon(mv, g, screen.x - startIcon.getIconWidth()/2,
    293293                    screen.y - endIcon.getIconHeight());
  • applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/MoveRouteNodeAction.java

    r15707 r16290  
    113113                for (int i=0;i<nl.size();i++) {
    114114                    Node node = nl.get(i);
    115                     double d = Main.map.mapView.getPoint(node.eastNorth).distanceSq(e.getPoint());
     115                    double d = Main.map.mapView.getPoint(node.getEastNorth()).distanceSq(e.getPoint());
    116116                    if (d < dmax) {
    117117                        dmax = d;
  • applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/RemoveRouteNodeAction.java

    r15707 r16290  
    102102                for (int i=0;i<nl.size();i++) {
    103103                    Node node = nl.get(i);
    104                     double d = Main.map.mapView.getPoint(node.eastNorth).distanceSq(e.getPoint());
     104                    double d = Main.map.mapView.getPoint(node.getEastNorth()).distanceSq(e.getPoint());
    105105                    if (d < dmax) {
    106106                        dmax = d;
  • applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingDialog.java

    r15707 r16290  
    125125     */
    126126    public void addNode(Node n) {
    127         model.addElement(n.id+" ["+n.coor.toDisplayString()+"]");
     127        model.addElement(n.id+" ["+n.getCoor().toDisplayString()+"]");
    128128    }
    129129
     
    134134     */
    135135    public void insertNode(int index, Node n) {
    136         model.insertElementAt(n.id+" ["+n.coor.toDisplayString()+"]", index);
     136        model.insertElementAt(n.id+" ["+n.getCoor().toDisplayString()+"]", index);
    137137    }
    138138
Note: See TracChangeset for help on using the changeset viewer.