From 94eee4a484097eaecd8bfecd97a6f9b12fd492d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Flavio=20Bont=C3=A0?= Date: Thu, 13 Nov 2025 16:57:28 +0100 Subject: [PATCH] fix apri in google maps url --- .../strutture-pubbliche/strutture-pubbliche.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/modules/public/strutture-pubbliche/strutture-pubbliche.component.ts b/src/app/modules/public/strutture-pubbliche/strutture-pubbliche.component.ts index 832a5a2..e191b0c 100644 --- a/src/app/modules/public/strutture-pubbliche/strutture-pubbliche.component.ts +++ b/src/app/modules/public/strutture-pubbliche/strutture-pubbliche.component.ts @@ -414,8 +414,8 @@ export class StrutturePubblicheComponent { ? ', ' + struttura.struttura.numeroCivico : '' }`; - address += `${struttura.struttura.cap} ${struttura.struttura.codiceLuogo.comune}`; - address += `${struttura.struttura.codiceLuogo.provincia ? '(' + struttura.struttura.codiceLuogo.siglaProvincia + ')' : ''}`; + address += `${struttura.struttura.cap} ${struttura.struttura.codiceLuogo.comune}(${struttura.struttura.codiceLuogo.siglaProvincia})`; + // address += `${struttura.struttura.codiceLuogo.provincia ? '(' + struttura.struttura.codiceLuogo.siglaProvincia + ')' : ''}`; const destination = encodeURIComponent( `${struttura.struttura.nome}, ${address}`, @@ -430,6 +430,10 @@ export class StrutturePubblicheComponent { if (this.calcolaIndirizzoDa) { url = `${url}&origin=${this.calcolaIndirizzoDa}`; } + const luogo = this.cercaStruttureForm.controls.luogo.value; + if (luogo) { + url = `${url}, ${luogo.luogo}`; + } url = `${url}&travelmode=${travelMode}`; window.open(url, '_blank');