diff --git a/frontend/js/main_map.js b/frontend/js/main_map.js index 68d9de7..25463c4 100644 --- a/frontend/js/main_map.js +++ b/frontend/js/main_map.js @@ -1005,7 +1005,10 @@ async function loadScenes(urlToken = null) { if (!assetId) return; // Bỏ qua nếu không có ảnh liên kết const sceneName = scene.name || scene.title || "Untitled Scene"; - console.log(`[Frontend] Đang thêm marker cho Scene: ${sceneName} (ID: ${scene._id}, Privacy: ${scene.privacy})`); + const tourName = (scene.tourId && typeof scene.tourId === 'object') ? scene.tourId.name : sceneName; + const tourDescription = (scene.tourId && typeof scene.tourId === 'object') ? scene.tourId.description : scene.description; + + console.log(`[Frontend] Đang thêm marker cho Tour: ${tourName} (Scene đại diện: ${sceneName})`); const isProcessing = scene.status === 'processing'; if (isProcessing) foundProcessing++; @@ -1037,15 +1040,15 @@ async function loadScenes(urlToken = null) { const marker = L.marker([latNum, lngNum], { icon: calloutIcon, - title: sceneName + title: tourName }); // Tạo nội dung thông tin khi Hover (Tooltip) const createdDate = formatSystemDate(scene.assetId?.createdAt); const tooltipContent = `