Skip to content

Commit

Permalink
Feature/#124 map (#125)
Browse files Browse the repository at this point in the history
* detailPopup CSS

* detailPopup 내부 tag, gathring 버튼 CSS

* 장소등록 버튼 추가 및 카테고리별 장소 등록 구현

* 페이지 이동 경로 수정

* 카테고리 등록으로 이동하는 버튼 추가, 상세-태그 버튼 페이지 이동 수정

* map 도메인 삭제 + homeMap.html->categoryMap.html로 이름 변경 + Map.html에 불필요한 주석 제거

* 검색 화면에 뒤로가기 버튼 생성 및 검색 리스트 크기 늘리기 및 내 위치 찾기 버튼 위치 수정

* 내 위치 찾기 버튼 위치 수정 + 검색 페이지 뒤로 가기 버튼 생성 + css 색깔 수정

Co-authored-by: Aruming <[email protected]>
  • Loading branch information
joong2043 and Aruming authored Sep 20, 2022
1 parent 6d06824 commit 5148256
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 767 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package com.lion.youranmok.map.controller;

import com.lion.youranmok.category.dto.CategoryDto;
import com.lion.youranmok.category.service.CategoryService;
//import com.lion.youranmok.map.dto.MapDto;
//import com.lion.youranmok.map.service.MapService;
import com.lion.youranmok.security.dto.MemberContext;
import lombok.RequiredArgsConstructor;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RequestMapping("/map")
@Controller
@RequiredArgsConstructor
public class MapController {
// private final MapService mapService;
private final CategoryService categoryService;

// @GetMapping("/addPlace/{place_name}/{address_name}")
// public String addPlace(@PathVariable String place_name, @PathVariable String address_name){
//
// mapService.add(place_name,address_name);
//
// return "redirect:/";
//
// }

// @GetMapping("/mapSearch")
// public String searchMap(){
//
// }

// @GetMapping("/searchMap")
// public String searchPlace(@AuthenticationPrincipal MemberContext member, @RequestParam("placeKeyword") String placeKeyword, Model model){
// List<CategoryDto> categoryList = categoryService.findAll();
// model.addAttribute("placeKeyword",placeKeyword);
// model.addAttribute("categoryList",categoryList);
// return "map/searchMap";
// }

// @GetMapping("/category")
// public String categoryDisplay(@RequestParam("id") int id, Model model){
//
// List<MapDto> categoryPlaceList = mapService.getCateogryPlaceList(id);
// for (MapDto mapDto : categoryPlaceList){
// System.out.println(mapDto.getName());
// }
// model.addAttribute("categoryPlaceList",categoryPlaceList);
//
// return "map/categoryMap";
// }
// localhost:8080/category?id=14
}

Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ public String searchPlace(@AuthenticationPrincipal MemberContext member,@Request
Category category = categoryService.getCategoryById(categoryId);

model.addAttribute("categoryName", category.getTagName());

model.addAttribute("categoryList",categoryList);
model.addAttribute("categoryObject",category);

Expand Down
23 changes: 17 additions & 6 deletions your-anmok/src/main/resources/templates/map/categoryMap.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@
font-style: normal;
}

#my_location_button{position: absolute;bottom:-150px;right:0;z-index: 100;}
/*내 위치 찾기 버튼 관련 CSS*/
#my_location_button{position: absolute;bottom:-440px;right:10px;z-index: 100; height: 50px; background-color: #7FD1AE}

#searchMapFormByCategoryId{position: absolute;bottom:-100px;right:0;z-index: 100;}
#makeMyCategory{position: absolute;bottom:-200px;right:0;z-index: 100;}

/*슬라이드 버튼 관련 CSS*/
/*#hamburger_button {*/
/* cursor:pointer;*/
Expand Down Expand Up @@ -53,7 +56,18 @@
z-index: 200;
}


/* 추가된 부분 */
.hamburger_line {
display: inline-block;
background:black;
margin: 2px !important;
width:56px;
height:7px;
border-radius:2px;
box-shadow:0 1px 3px rgba(0,0,0,.5);
position:relative;
z-index: 200;
}

.left_sub_menu {
position: fixed;
Expand Down Expand Up @@ -171,8 +185,6 @@
}

/* */
#my_location_button{position: absolute;bottom:0;right:0;z-index: 100}
#my_location_button1{position: absolute;bottom:0;right:0;z-index: 100}

.map_wrap, .map_wrap * {margin:0;padding:0;font-family:'Malgun Gothic',dotum,'돋움',sans-serif;font-size:12px;}
.map_wrap a, .map_wrap a:hover, .map_wrap a:active{color:#000;text-decoration: none;}
Expand Down Expand Up @@ -214,7 +226,7 @@
</div>


<button id="my_location_button" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded fas fa-crosshairs" onclick="getCurrentPosBtn()">
<button id="my_location_button" class="text-white font-bold py px-4 rounded fas fa-crosshairs fa-3x" onclick="getCurrentPosBtn()">
</button>
<form th:action="@{/searchMap}" id="searchMapFormByCategoryId">
<input type="text" name="categoryId" th:value="${categoryId}" id="searchMapButtonByCategoryId" size="15" style="display: none;" />
Expand All @@ -233,7 +245,6 @@
<button type="button" class="categoryBtn btn btn-secondary text-nowrap mr-3" th:text="${categoryName}"></button>
</div>


<div class="left_sub_menu">
<div class="sub_menu">
<div class="d-flex flex-row justify-between">
Expand Down
Loading

0 comments on commit 5148256

Please sign in to comment.