Changeset 16290 in osm for applications/editors/josm/plugins/routing/src/com
- Timestamp:
- 2009-07-03T12:34:14+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/routing/src/com/innovant/josm
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraph.java
r15707 r16290 160 160 */ 161 161 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()); 163 163 164 164 OsmEdge edge = new OsmEdge(way, from, to); -
applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/osm/OsmEdge.java
r15707 r16290 69 69 this.from = from; 70 70 this.to = to; 71 this.length = from. coor.greatCircleDistance(to.coor);71 this.length = from.getCoor().greatCircleDistance(to.getCoor()); 72 72 } 73 73 … … 80 80 81 81 public EastNorth fromEastNorth() { 82 return this.from. eastNorth;82 return this.from.getEastNorth(); 83 83 } 84 84 85 85 public EastNorth toEastNorth() { 86 return this.to. eastNorth;86 return this.to.getEastNorth(); 87 87 } 88 88 -
applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingLayer.java
r15707 r16290 139 139 if (n.deleted || n.incomplete) continue; 140 140 141 Point P = Main.map.mapView.getPoint(n. eastNorth);141 Point P = Main.map.mapView.getPoint(n.getEastNorth()); 142 142 double dist = p.distanceSq(P); 143 143 if (dist < NavigatableComponent.snapDistance) { … … 275 275 // paint start icon 276 276 Node node = nodes.get(0); 277 Point screen = mv.getPoint(node. eastNorth);277 Point screen = mv.getPoint(node.getEastNorth()); 278 278 startIcon.paintIcon(mv, g, screen.x - startIcon.getIconWidth()/2, 279 279 screen.y - startIcon.getIconHeight()); … … 282 282 for(int index = 1; index < nodes.size() - 1; ++index) { 283 283 node = nodes.get(index); 284 screen = mv.getPoint(node. eastNorth);284 screen = mv.getPoint(node.getEastNorth()); 285 285 middleIcon.paintIcon(mv, g, screen.x - startIcon.getIconWidth()/2, 286 286 screen.y - middleIcon.getIconHeight()); … … 289 289 if(nodes.size() > 1) { 290 290 node = nodes.get(nodes.size() - 1); 291 screen = mv.getPoint(node. eastNorth);291 screen = mv.getPoint(node.getEastNorth()); 292 292 endIcon.paintIcon(mv, g, screen.x - startIcon.getIconWidth()/2, 293 293 screen.y - endIcon.getIconHeight()); -
applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/MoveRouteNodeAction.java
r15707 r16290 113 113 for (int i=0;i<nl.size();i++) { 114 114 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()); 116 116 if (d < dmax) { 117 117 dmax = d; -
applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/RemoveRouteNodeAction.java
r15707 r16290 102 102 for (int i=0;i<nl.size();i++) { 103 103 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()); 105 105 if (d < dmax) { 106 106 dmax = d; -
applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingDialog.java
r15707 r16290 125 125 */ 126 126 public void addNode(Node n) { 127 model.addElement(n.id+" ["+n. coor.toDisplayString()+"]");127 model.addElement(n.id+" ["+n.getCoor().toDisplayString()+"]"); 128 128 } 129 129 … … 134 134 */ 135 135 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); 137 137 } 138 138
Note:
See TracChangeset
for help on using the changeset viewer.