fix: correct Routes API service usage and fix bus stops missing markers
This commit is contained in:
@ -41,7 +41,8 @@ export function useDirectionsRoute() {
|
||||
|
||||
try {
|
||||
// Importar librerías necesarias de la nueva API
|
||||
const { Route } = await google.maps.importLibrary("routes") as any;
|
||||
const { RoutesService } = await google.maps.importLibrary("routes") as any;
|
||||
const routeService = new RoutesService();
|
||||
|
||||
// Límite de la API de Google Maps Routes: Origen, Destino, y hasta 25 intermediates
|
||||
const maxPuntosPorChunk = 25;
|
||||
@ -79,7 +80,7 @@ export function useDirectionsRoute() {
|
||||
}));
|
||||
|
||||
try {
|
||||
const response = await Route.computeRoutes({
|
||||
const response = await routeService.computeRoutes({
|
||||
origin,
|
||||
destination,
|
||||
intermediates,
|
||||
|
||||
Reference in New Issue
Block a user