bug(google-maps): Zoom not updated on centerChange
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
### What are you trying to do?
Trying to zoom map after center change:
google-maps.component.html
```
```
google-maps.component.ts
```
export class GoogleMapsComponent {
@Input() center!: google.maps.LatLngLiteral;
zoom = 17;
...
centerChanged() {
console.log('center changed');
this.zoom = 17;
}
```
### What troubleshooting steps have you tried?
Zoom is not changed
### Reproduction
Steps to reproduce:
1. User changes zoom
2. User clicks on marker link that updates center variable.
3. Center is changed, console.log is fired but zoom is not updated
### Environment
- Angular: 12.2.6
- Browser(s): Firefox/Chrome
- Operating System Windows
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo i tre passaggi in google-maps.component.html con la logica corrispondente in google-maps.component.ts, confermando che centerChanged venga attivato mentre zoom rimane invariato. Traccia il comportamento del binding di Angular Google Maps e verifica la correzione assicurandoti che un aggiornamento del centro ripristini lo zoom a 17.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- frontend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100