in src/maps_planner/index.ts [537:583]
async function setPin(args) {
const point = {lat: Number(args.lat), lng: Number(args.lng)};
points.push(point);
bounds.extend(point);
const marker = new AdvancedMarkerElement({
map,
position: point,
title: args.name,
});
markers.push(marker);
map.panTo(point);
map.fitBounds(bounds);
const content = document.createElement('div');
let timeInfo = '';
if (args.time) {
timeInfo = `<div style="margin-top: 4px; font-size: 12px; color: #2196F3;">
<i class="fas fa-clock"></i> ${args.time}
${args.duration ? ` • ${args.duration}` : ''}
</div>`;
}
content.innerHTML = `<b>${args.name}</b><br/>${args.description}${timeInfo}`;
const popup = new window.Popup(new google.maps.LatLng(point), content);
if (!isPlannerMode) {
popup.setMap(map);
}
const locationInfo = {
name: args.name,
description: args.description,
position: new google.maps.LatLng(point),
popup,
content,
time: args.time,
duration: args.duration,
sequence: args.sequence,
};
popUps.push(locationInfo);
if (isPlannerMode && args.time) {
dayPlanItinerary.push(locationInfo);
}
}