Skip to content

Commit

Permalink
Remove mapbox query
Browse files Browse the repository at this point in the history
  • Loading branch information
MurrayGroves committed Feb 29, 2024
1 parent e32cd96 commit 945bb19
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions saferoute/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,6 @@ function App() {
let coordsList = data["route"];
console.log(coordsList);
setNewRoute(coordsList);
let coordsString = "";
for (let i = 0; i < coordsList.length; i++) {
coordsString += coordsList[i][0] + "," + coordsList[i][1] + ";";
}
coordsString = coordsString.slice(0, -1);
let radiuses = "";
for (let i = 0; i < coordsList.length; i++) {
radiuses += "50;";
}
radiuses = radiuses.slice(0, -1);
fetch(
`https://api.mapbox.com/matching/v5/mapbox/walking/${coordsString}.json?access_token=${process.env.REACT_APP_MAPBOX_KEY}&radiuses=${radiuses}`
).then((response) =>
response.json().then((data) => {
console.log(data);
})
);
});
}
);
Expand Down

0 comments on commit 945bb19

Please sign in to comment.