Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/65 update map page #70

Merged
merged 15 commits into from
Nov 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[feature] 아이콘 변경 및 가게명 폰트 변경
choihooo committed Nov 13, 2024
commit 1c6257e9a790a4db8749b3559d896f89bca3d5d0
25 changes: 13 additions & 12 deletions fe/public/pin/level1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 13 additions & 12 deletions fe/public/pin/level2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 13 additions & 12 deletions fe/public/pin/level3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 13 additions & 12 deletions fe/public/pin/level4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 16 additions & 4 deletions fe/src/app/event-maps/[id]/components/MapComponent.tsx
Original file line number Diff line number Diff line change
@@ -24,12 +24,24 @@ export default function MapComponent({ px, py }: MapComponentProps) {
isSelected: boolean = false
) => {
const iconSize = isSelected ? 44 : 36;
let textColor, textShadow;

if (level === 1) {
textColor = "#000000"; // 검정색 글씨
textShadow =
"-1px 0px #FFFFFF, 0px 1px #FFFFFF, 1px 0px #FFFFFF, 0px -1px #FFFFFF"; // 흰색 텍스트 쉐도우 테두리
} else {
textColor = "#FA8980"; // 살구색 글씨
textShadow =
"-1px 0px #FFFFFF, 0px 1px #FFFFFF, 1px 0px #FFFFFF, 0px -1px #FFFFFF"; // 흰색 텍스트 쉐도우 테두리
}

return {
content: `<div style="position: relative; width: ${iconSize}px; height: ${iconSize}px; background: url('/pin/level${level}.svg') no-repeat center center; background-size: contain;">
<div style="position: absolute; top: ${iconSize}px; left: 50%; transform: translateX(-50%); white-space: nowrap; color: #000; font-size: 12px; text-align: center;">
${placeName}
</div>
</div>`,
<div style="position: absolute; top: ${iconSize / 1.2}px; left: 50%; transform: translateX(-50%); white-space: nowrap; color: ${textColor}; font-size: 12px; text-align: center; text-shadow: ${textShadow}; padding: 2px 4px; border-radius: 4px;">
${placeName}
</div>
</div>`,
size: new window.naver.maps.Size(iconSize, iconSize),
anchor: new window.naver.maps.Point(iconSize / 2, iconSize + 15), // 라벨이 포함되므로 앵커 포지션 조정
};