From 5c2ac2ed3fd62287d4b0c58dd5853bb9502c6a00 Mon Sep 17 00:00:00 2001 From: Samantha Date: Tue, 9 Jun 2026 02:43:51 +0900 Subject: [PATCH] location marker - Jisu legacy --- src/lib/components/MapView.Svelte | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/lib/components/MapView.Svelte b/src/lib/components/MapView.Svelte index 837cf87..4796fc2 100644 --- a/src/lib/components/MapView.Svelte +++ b/src/lib/components/MapView.Svelte @@ -13,6 +13,25 @@ let markers = []; // keep track of pins on map + + /** Jisu Legacy - 내 위치 마커 (메시지 핀과 구분되는 파란 점) */ + function addUserLocationMarker(map, centerLat, centerLng) { + userMarker = new google.maps.Marker({ + position: { lat: centerLat, lng: centerLng }, + map, + title: 'Your location', + zIndex: 1000, + icon: { + path: google.maps.SymbolPath.CIRCLE, + scale: 10, + fillColor: '#4285F4', + fillOpacity: 1, + strokeColor: '#ffffff', + strokeWeight: 3 + } + }); + } + onMount (async () => { const centerLat = Number(lat); const centerLng = Number(lng); @@ -31,6 +50,8 @@ disableDefaultUI: true, gestureHandling: 'greedy' }); + + addUserLocationMarker(mapDiv, centerLat, centerLng); }); // function to rended pins