Skip to content

Commit

Permalink
fix(routing): Fix switched x and y
Browse files Browse the repository at this point in the history
Fix switched x and y for point in solveRoute

BREAKING CHANGE: Switch x and y in point for solveRoute
  • Loading branch information
DKaminari committed Mar 13, 2019
1 parent 6673102 commit cc22727
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/arcgis-rest-routing/src/solveRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export function solveRoute(
return coords.longitude + "," + coords.latitude;
}
} else {
return coords.y + "," + coords.x;
return coords.x + "," + coords.y;
}
});
options.params.stops = stops.join(";");
Expand Down
8 changes: 4 additions & 4 deletions packages/arcgis-rest-routing/test/solveRoute.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ const stopsObjectsLatitudeLongitude: ILocation[] = [

const stopsObjectsPoint: IPoint[] = [
{
x: 34.056383,
y: -117.195677
x: -117.195677,
y: 34.056383
},
{
x: 33.812092,
y: -117.918976
x: -117.918976,
y: 33.812092
}
];

Expand Down

0 comments on commit cc22727

Please sign in to comment.