fix(): fix infowindow map
This commit is contained in:
parent
672374d238
commit
6c61f202e9
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"repoId": "bc5fa7a7-7313-4845-954c-7227b0073b63",
|
"repoId": "bc5fa7a7-7313-4845-954c-7227b0073b63",
|
||||||
"lastSync": 0
|
"lastSync": 0
|
||||||
}
|
}
|
||||||
@ -279,6 +279,7 @@ export class StrutturePubblicheComponent {
|
|||||||
const info = this.struttureConCoords[index];
|
const info = this.struttureConCoords[index];
|
||||||
const contentString = `
|
const contentString = `
|
||||||
<div>
|
<div>
|
||||||
|
<i class="hover:text-gray-500 absolute top-[3px] right-[3px] pi pi-times" id="close_${info.struttura.id}"></i>
|
||||||
<div>
|
<div>
|
||||||
<span class="text-primary" style="font-size: 20px;font-weight: bold;">${'<i class="text-primary pi pi-star-fill"></i>'.repeat(
|
<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,
|
info.struttura.stelline.length,
|
||||||
@ -288,14 +289,14 @@ export class StrutturePubblicheComponent {
|
|||||||
}</h1>
|
}</h1>
|
||||||
</div>
|
</div>
|
||||||
<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.indirizzo}${
|
||||||
info.struttura.numeroCivico
|
info.struttura.numeroCivico
|
||||||
? ', ' + info.struttura.numeroCivico
|
? ', ' + info.struttura.numeroCivico
|
||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
</p>
|
</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.cap} ${info.struttura.codiceLuogo.comune} ${
|
||||||
info.struttura.codiceLuogo.provincia
|
info.struttura.codiceLuogo.provincia
|
||||||
? '(' + info.struttura.codiceLuogo.siglaProvincia + ')'
|
? '(' + info.struttura.codiceLuogo.siglaProvincia + ')'
|
||||||
@ -308,13 +309,14 @@ export class StrutturePubblicheComponent {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
this.infoWindow.infoWindow?.setHeaderDisabled(true);
|
||||||
this.infoWindow.infoWindow?.setContent(contentString);
|
this.infoWindow.infoWindow?.setContent(contentString);
|
||||||
this.infoWindow.open(marker);
|
this.infoWindow.open(marker);
|
||||||
this.infoWindow.infoWindow?.addListener('domready', () => {
|
this.infoWindow.infoWindow?.addListener('domready', () => {
|
||||||
const el = document.getElementById(`facility_${info?.struttura.id}`);
|
const el = document.getElementById(`close_${info?.struttura.id}`);
|
||||||
if (el) {
|
if (el) {
|
||||||
el.addEventListener('click', () => {
|
el.addEventListener('click', () => {
|
||||||
// this.next(info);
|
this.infoWindow.infoWindow?.close();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user