fix(): fix infowindow map

This commit is contained in:
Flavio Bontà 2025-11-17 09:43:51 +01:00
parent 672374d238
commit 6c61f202e9
2 changed files with 7 additions and 5 deletions

View File

@ -1,4 +1,4 @@
{
"repoId": "bc5fa7a7-7313-4845-954c-7227b0073b63",
"lastSync": 0
}
}

View File

@ -279,6 +279,7 @@ export class StrutturePubblicheComponent {
const info = this.struttureConCoords[index];
const contentString = `
<div>
<i class="hover:text-gray-500 absolute top-[3px] right-[3px] pi pi-times" id="close_${info.struttura.id}"></i>
<div>
<span class="text-primary" style="font-size: 20px;font-weight: bold;">${'<i class="text-primary pi pi-star-fill"></i>'.repeat(
info.struttura.stelline.length,
@ -288,14 +289,14 @@ export class StrutturePubblicheComponent {
}</h1>
</div>
<div>
<p class="m-t-0 m-b-0" style="color: #222428">
<p class="m-t-0 m-b-0"">
${info.struttura.indirizzo}${
info.struttura.numeroCivico
? ', ' + info.struttura.numeroCivico
: ''
}
</p>
<p class="m-t-0 m-b-0" style="color: #222428;">
<p class="m-t-0 m-b-0"">
${info.struttura.cap} ${info.struttura.codiceLuogo.comune} ${
info.struttura.codiceLuogo.provincia
? '(' + info.struttura.codiceLuogo.siglaProvincia + ')'
@ -308,13 +309,14 @@ export class StrutturePubblicheComponent {
</div>
</div>
`;
this.infoWindow.infoWindow?.setHeaderDisabled(true);
this.infoWindow.infoWindow?.setContent(contentString);
this.infoWindow.open(marker);
this.infoWindow.infoWindow?.addListener('domready', () => {
const el = document.getElementById(`facility_${info?.struttura.id}`);
const el = document.getElementById(`close_${info?.struttura.id}`);
if (el) {
el.addEventListener('click', () => {
// this.next(info);
this.infoWindow.infoWindow?.close();
});
}
});