location marker - Jisu legacy
This commit is contained in:
@@ -13,6 +13,25 @@
|
|||||||
|
|
||||||
let markers = []; // keep track of pins on map
|
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 () => {
|
onMount (async () => {
|
||||||
const centerLat = Number(lat);
|
const centerLat = Number(lat);
|
||||||
const centerLng = Number(lng);
|
const centerLng = Number(lng);
|
||||||
@@ -31,6 +50,8 @@
|
|||||||
disableDefaultUI: true,
|
disableDefaultUI: true,
|
||||||
gestureHandling: 'greedy'
|
gestureHandling: 'greedy'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
addUserLocationMarker(mapDiv, centerLat, centerLng);
|
||||||
});
|
});
|
||||||
|
|
||||||
// function to rended pins
|
// function to rended pins
|
||||||
|
|||||||
Reference in New Issue
Block a user