diff --git a/dotenv b/dotenv index b2485dc..11e0bfe 100644 --- a/dotenv +++ b/dotenv @@ -1 +1,2 @@ -VITE_API_URL="https://api.etaviaporte.com/api" \ No newline at end of file +VITE_API_URL="https://api.etaviaporte.com/api" +VITE_MAP_KEY="AIzaSyBm3n6I_uMzKkMS0eVXnLdoa1S_hPcsx0A" \ No newline at end of file diff --git a/scripts/ci_functions.sh b/scripts/ci_functions.sh index d6c110d..0072528 100644 --- a/scripts/ci_functions.sh +++ b/scripts/ci_functions.sh @@ -8,6 +8,7 @@ function build_static(){ nvm use 18 npm install --force 2>/dev/null set -x + cat dotenv > .env npm run build 2>/dev/null cp htaccess dist/.htaccess zip -r $BUILD_NAME.zip dist/ diff --git a/src/components/MapDirections.vue b/src/components/MapDirections.vue index 3765211..6dc093c 100644 --- a/src/components/MapDirections.vue +++ b/src/components/MapDirections.vue @@ -42,11 +42,11 @@ const geocodeAddress = async (address) => { // Utiliza la API de geocodificación de Google Maps para obtener las coordenadas - const apiKey = 'AIzaSyAJtfvrAKy7vnUSv2nzk4dYQkOs3OP4MMs'; // Reemplaza con tu clave de API + // const apiKey = 'AIzaSyAJtfvrAKy7vnUSv2nzk4dYQkOs3OP4MMs'; // Reemplaza con tu clave de API const response = await fetch( `https://maps.googleapis.com/maps/api/geocode/json?address=${encodeURIComponent( address - )}&key=${apiKey}` + )}&key=${mapKey}` ); const data = await response.json(); const location = data.results[0].geometry.location; @@ -55,12 +55,12 @@ }; const getDirections = async () => { - const apiKey = 'AIzaSyAJtfvrAKy7vnUSv2nzk4dYQkOs3OP4MMs'; + // const apiKey = 'AIzaSyAJtfvrAKy7vnUSv2nzk4dYQkOs3OP4MMs'; const originLatLng = `${originCoords.value.lat},${originCoords.value.lng}`; const destinationLatLng = `${destinationCoords.value.lat},${destinationCoords.value.lng}`; try { const response = await fetch( - `https://maps.googleapis.com/maps/api/directions/json?origin=${originLatLng}&destination=${destinationLatLng}&key=${apiKey}` + `https://maps.googleapis.com/maps/api/directions/json?origin=${originLatLng}&destination=${destinationLatLng}&key=${mapKey}` ); const data = await response.json();