Changeset 29275 in osm for applications/editors/josm/plugins/smed2
- Timestamp:
- 2013-02-22T13:53:24+01:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/smed2/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/seamap/Renderer.java
r29271 r29275 157 157 if (!gap) { 158 158 Symbols.drawSymbol(g2, symbol, sScale, curr.getX(), curr.getY(), 159 new Delta(Handle.BC, AffineTransform.getRotateInstance(Math.atan2((succ.getY() - curr.getY()), (succ.getX() - curr.getX()) + Math.toRadians(90)))), null);159 new Delta(Handle.BC, AffineTransform.getRotateInstance(Math.atan2((succ.getY() - curr.getY()), (succ.getX() - curr.getX())) + Math.toRadians(90))), null); 160 160 } 161 161 if (space > 0) gap = !gap; -
applications/editors/josm/plugins/smed2/src/seamap/Rules.java
r29266 r29275 294 294 case ACHARE: 295 295 if (zoom >= 12) { 296 Renderer.symbol(feature, Harbours.Anchorage, null, null); 296 if (feature.flag != Fflag.LINE) 297 Renderer.symbol(feature, Harbours.Anchorage, null, null); 297 298 Renderer.lineSymbols(feature, Areas.Restricted, 1.0, Areas.LineAnchor, 10); 298 299 if ((zoom >= 15) && ((name) != null)) { -
applications/editors/josm/plugins/smed2/src/seamap/SeaMap.java
r29272 r29275 201 201 202 202 public boolean hasNext() { 203 return (edge != null) && ((it == null) || (edge.nodes.isEmpty()) || (forward && it.hasNext()) || (!forward && it.hasPrevious()));203 return (edge != null); 204 204 } 205 205 … … 253 253 254 254 public boolean hasNext() { 255 return side != null;255 return (side != null) && ((sit.hasNext()) || (eit.hasNext())); 256 256 } 257 257 … … 502 502 llon = lon; 503 503 } 504 double frac = harc / sarc; 505 return new Snode(llat + ((lat - llat) / frac), llon + ((lon - llon) / frac)); 504 return new Snode(llat + ((lat - llat) * harc / sarc), llon + ((lon - llon) * harc / sarc)); 506 505 case AREA: 507 506 Bound bound = areas.get(feature.refs).get(0); -
applications/editors/josm/plugins/smed2/src/smed2/Smed2Action.java
r29272 r29275 41 41 @Override 42 42 public void dataChanged(DataChangedEvent e) { 43 System.out.println("DataChangedEvent"); 43 // System.out.println("DataChangedEvent"); 44 makeMap(); 45 if (rendering != null) rendering.zoomChanged(); 44 46 } 45 47 46 48 @Override 47 49 public void nodeMoved(NodeMovedEvent e) { 48 System.out.println("NodeMovedEvent"); 50 // System.out.println("NodeMovedEvent"); 51 makeMap(); 52 if (rendering != null) rendering.zoomChanged(); 49 53 } 50 54 51 55 @Override 52 56 public void otherDatasetChange(AbstractDatasetChangedEvent e) { 53 System.out.println("AbstractDatasetChangedEvent"); 57 // System.out.println("AbstractDatasetChangedEvent"); 58 makeMap(); 59 if (rendering != null) rendering.zoomChanged(); 54 60 } 55 61 56 62 @Override 57 63 public void primitivesAdded(PrimitivesAddedEvent e) { 58 System.out.println("PrimitivesAddedEvent"); 64 // System.out.println("PrimitivesAddedEvent"); 65 makeMap(); 66 if (rendering != null) rendering.zoomChanged(); 59 67 } 60 68 61 69 @Override 62 70 public void primitivesRemoved(PrimitivesRemovedEvent e) { 63 System.out.println("PrimitivesRemovedEvent"); 71 // System.out.println("PrimitivesRemovedEvent"); 72 makeMap(); 73 if (rendering != null) rendering.zoomChanged(); 64 74 } 65 75 66 76 @Override 67 77 public void relationMembersChanged(RelationMembersChangedEvent e) { 68 System.out.println("RelationMembersChangedEvent"); 78 // System.out.println("RelationMembersChangedEvent"); 79 makeMap(); 80 if (rendering != null) rendering.zoomChanged(); 69 81 } 70 82 71 83 @Override 72 84 public void tagsChanged(TagsChangedEvent e) { 73 System.out.println("TagsChangedEvent"); 85 // System.out.println("TagsChangedEvent"); 86 makeMap(); 87 if (rendering != null) rendering.zoomChanged(); 74 88 } 75 89 76 90 @Override 77 91 public void wayNodesChanged(WayNodesChangedEvent e) { 78 System.out.println("WayNodesChangedEvent"); 92 // System.out.println("WayNodesChangedEvent"); 93 makeMap(); 94 if (rendering != null) rendering.zoomChanged(); 79 95 } 80 96 }; … … 109 125 editFrame.setResizable(true); 110 126 editFrame.setAlwaysOnTop(true); 111 editFrame.setVisible(true);127 // editFrame.setVisible(true); 112 128 panelMain = new PanelMain(); 113 129 editFrame.add(panelMain); … … 175 191 if (nextNode.compareTo(node) != 0) { 176 192 node = nextNode; 177 showFrame.setVisible(true);178 showFrame.showFeature(node, map);193 // showFrame.setVisible(true); 194 // showFrame.showFeature(node, map); 179 195 } 180 196 } else { … … 187 203 if (nextWay.compareTo(way) != 0) { 188 204 way = nextWay; 189 showFrame.setVisible(true);190 showFrame.showFeature(way, map);205 // showFrame.setVisible(true); 206 // showFrame.showFeature(way, map); 191 207 } 192 208 } else {
Note:
See TracChangeset
for help on using the changeset viewer.