second: open camera

This commit is contained in:
2026-06-08 16:23:24 +09:00
parent 15be996704
commit 2b4a005407
9 changed files with 352 additions and 54 deletions

View File

@@ -10,9 +10,28 @@
let { lat, lng } = $props();
let mapDiv;
let userMarker = null;
let markers = []; // keep track of pins on map
/** 내 위치 마커 (메시지 핀과 구분되는 파란 점) */
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