Open
Conversation
검색버튼 클릭은 커스텀이벤트 사용
datalist 스타일로 표현
모달창의 중심에 가게가 잘 보이지 않음
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
미션4
#10
기본 요구사항
1. 메인 화면을 구현합니다.
2. 가게 검색 기능을 구현합니다.
3. 페이지를 구현합니다.
추가 요구사항
1. 검색 히스토리
2. 검색 결과가 느린 경우 처리방법
3. 카카오맵 API를 사용하여 Modal UI로 표시
([191226] mission003 #8 미션3에서 사용한 UI를 참조)
미션방식
index.html - (App.js)
SearchStoreName : 키워드를 조회하여 API에서 가게정보 가져오기
ShowStoreList : 조회된 가게 리스트 보여주기
ShowHistoryList : LocalStorage에 저장된 검색어를 조회, 추가, 삭제 기능
ManagePage : 페이지 클릭시 버튼의 페이지를 가져오고, 최근검색어부분에서 키워드를 가져오고 API를 통해 가게정보 가져오기
ShowPage : 최대페이지를 감안하여 페이지 보여주기
ManageMap : 카카오맵 API를 이용하여 선택된 가게명, 가게주소를 Modal창에 보여주기
apiHandler는 지은님의 미션2코드를 사용하였습니다.
시행착오
카카오맵 구현시 모달UI를 띄운 뒤 map.relayout()을 실행해 주어야 지도가 제대로 표시되며
map.setCenter()를 맨 뒤에 실행해야 지도가 가게의 위치로 이동합니다.
카카오맵 infowindow의 크기가 고정이기때문에 가게이름이 전부 표시가 안되는 문제가 있어서 infowindow 대신에 커스텀오버레이를 사용하였습니다.
미션후기
Modal UI를 구현하기 위해서는 라이브러리가 꼭 필요한 것이 아니라 CSS의 설정에 따라 구현되는 것을 알았고, 평소에 지도표시 기능을 꼭 해보고 싶었는데 어설프게나마 구현해보아서 좋았습니다.
깔끔한 디자인을 구현하기 위해서는 CSS 공부가 많이 필요하다고 느꼈습니다.