Changeset 11992 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2017-04-24T01:13:54+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRenderer.java
r11357 r11992 223 223 public void visitVirtual(Path2D path, Way w) { 224 224 Iterator<Node> it = w.getNodes().iterator(); 225 if (it.hasNext()) { 226 MapViewPoint lastP = mapState.getPointFor(it.next()); 227 while (it.hasNext()) { 228 MapViewPoint p = mapState.getPointFor(it.next()); 229 if (isSegmentVisible(lastP, p) && isLargeSegment(lastP, p, virtualNodeSpace)) { 225 MapViewPoint lastP = null; 226 while (it.hasNext()) { 227 Node n = it.next(); 228 if (n.isLatLonKnown()) { 229 MapViewPoint p = mapState.getPointFor(n); 230 if (lastP != null && isSegmentVisible(lastP, p) && isLargeSegment(lastP, p, virtualNodeSpace)) { 230 231 double x = (p.getInViewX()+lastP.getInViewX())/2; 231 232 double y = (p.getInViewY()+lastP.getInViewY())/2; -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/OffsetIterator.java
r11696 r11992 5 5 import java.util.List; 6 6 import java.util.NoSuchElementException; 7 import java.util.stream.Collectors; 7 8 8 9 import org.openstreetmap.josm.data.osm.Node; … … 42 43 public OffsetIterator(MapViewState mapState, List<Node> nodes, double offset) { 43 44 this.mapState = mapState; 44 this.nodes = nodes ;45 this.nodes = nodes.stream().filter(Node::isLatLonKnown).collect(Collectors.toList()); 45 46 this.offset = offset; 46 47 idx = 0;
Note:
See TracChangeset
for help on using the changeset viewer.