Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#️⃣ 작업 내용
소통을 위해 잠깐 필요한 부분
제가 길을 백엔드에 잘못 줘서.. 아마 꺾이는 길에서 계속 5번 라우트가 뜰 예정입니다. 정상이니까 당황하지 마시고, 오히려 제보 테스트에 사용하면 좋을 거 같습니다~!
핵심 기능
길 조회 API 연결
#65 이 PR에서 길 조회 API를 만들어 놓았었는데, transformer까지 적용시켜 잘 만들어놓았습니다. 좀 불편한 부분은 nodeId를 다이렉트로 map 형태로 가져올 수 있는 데이터가 없는데 처음 시작과 끝에서 그릴 때 처음 index와 마지막 index를 활용해야 한다는 점이 cost입니다.
연결한 페이지는
두가지 페이지에 모두 다 연결했습니다.
적용한 방식
기존 로직은 하나의 Path에 대해서 그리는 방식이었는데, 조금 응용해서 2중 for문을 사용했습니다.
데이터 불러오는 속도 자체는 매우 빨라서, 사용자 입장에서 Overhead가 적은 것 같습니다. 나중에 개발자 창으로 Data가 얼마나 오는지 같이 확인해보면 좋을 것 같습니다.
2중 for문을 돌며, 동현님이 만들어놓으신 그대로 endNode부터 marker를 찍고 Polyline을 그린 후 event를 걸고, startNode를 그렸습니다.
근데 이렇게 2중 for문을 도는 것보다, coreNode들만 마커를 따로 찍고, 나머지들에 대해서 Polyline을 그리는 방식으로 변경하는 것도 좋을 것 같습니다. 우선은 만드신 로직 그대로 적용하고 싶어서 유지했습니다. (제보 페이지도 그대로 로직은 남겨둔채 2중 For문으로 변경했습니다.)
동작 화면
제보 화면
길 추가 화면
역시.. 잘 만들어놓으셔서 바로 적용이 되네요