Fix issue where extracting points could results in off placements (close #8246)

This commit is contained in:
Quincy Morgan
2020-12-11 12:50:32 -05:00
parent b3ad282f40
commit 0a0e2dcf75
5 changed files with 9 additions and 10 deletions
+2 -2
View File
@@ -1019,7 +1019,7 @@ describe('iD.osmWay', function() {
c = iD.osmNode({loc: [3, 4]}),
w = iD.osmWay({tags: {area: 'yes'}, nodes: [a.id, b.id, c.id, a.id]}),
graph = iD.coreGraph([a, b, c, w]),
json = w.asGeoJSON(graph, true);
json = w.asGeoJSON(graph);
expect(json.type).to.equal('Polygon');
expect(json.coordinates).to.eql([[a.loc, b.loc, c.loc, a.loc]]);
@@ -1031,7 +1031,7 @@ describe('iD.osmWay', function() {
c = iD.osmNode({loc: [3, 4]}),
w = iD.osmWay({tags: {area: 'yes'}, nodes: [a.id, b.id, c.id]}),
graph = iD.coreGraph([a, b, c, w]),
json = w.asGeoJSON(graph, true);
json = w.asGeoJSON(graph);
expect(json.type).to.equal('LineString');
expect(json.coordinates).to.eql([a.loc, b.loc, c.loc]);