fix(): fix infowindow map
This commit is contained in:
parent
672374d238
commit
6c61f202e9
@ -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();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user