Fix: Restore bus stop markers on route selection with yellow styling
This commit is contained in:
@ -4,6 +4,7 @@ import { useDirectionsRoute } from './useDirectionsRoute'
|
||||
import { useParadaCercana } from './useParadaCercana'
|
||||
import type { BusStop } from '@/types'
|
||||
import { useRouteStore } from '@/stores/route'
|
||||
import { useGoogleMaps } from './useGoogleMaps'
|
||||
|
||||
export const useFlujoPrincipal = () => {
|
||||
const { limpiarMapa } = useMapState()
|
||||
@ -106,25 +107,21 @@ export const useFlujoPrincipal = () => {
|
||||
}
|
||||
}
|
||||
|
||||
// ── PASO 6: Marcador de parada cercana (ELIMINADO por petición del usuario para mantener mapa limpio) ────────────────
|
||||
/*
|
||||
registrarMarker(
|
||||
new google.maps.Marker({
|
||||
position: { lat: paradaCercanaFound.latitude, lng: paradaCercanaFound.longitude },
|
||||
map,
|
||||
icon: {
|
||||
path: google.maps.SymbolPath.CIRCLE,
|
||||
fillColor: '#F59E0B',
|
||||
fillOpacity: 1,
|
||||
strokeColor: '#FFFFFF',
|
||||
strokeWeight: 3,
|
||||
scale: 12
|
||||
},
|
||||
title: paradaCercanaFound.name,
|
||||
zIndex: 10
|
||||
})
|
||||
)
|
||||
*/
|
||||
// ── PASO 6: Dibujar marcadores de todas las paradas (Restaurado) ──────────
|
||||
const { addCleanMarker } = useGoogleMaps()
|
||||
paradasFormateadas.forEach((p, i) => {
|
||||
const esCercana = i === idx;
|
||||
const esPasada = idx !== -1 && i < idx;
|
||||
|
||||
addCleanMarker(
|
||||
{ lat: p.latitud, lng: p.longitud },
|
||||
p.nombre,
|
||||
esCercana ? 'cercana' : (esPasada ? 'pasada' : 'normal'),
|
||||
() => {
|
||||
console.log(`Click en parada: ${p.nombre}`);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
// ── PASO 7: Pulso animado en ubicación del usuario ────
|
||||
dibujarPulsoUsuario(ubicacion, map)
|
||||
|
||||
Reference in New Issue
Block a user