angular / angular/components

docs(maps): Describe how to get map instance from within component.ts to input to MapMarker, InfoWindow

Offen
#24,042 1 Kommentar 4 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area: google-maps docs P3
Vorherrschende Sprache
TypeScript
Sterne
25k
Forks
6.8k
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
91

Beschreibung

### Documentation Feedback

Currently the example docs rely on a single use case where the user interacts with the map and a (mapClick) event grabs the map instance and passes it back to a component.ts function. If a developer wishes to decorate a map with a marker or an info window before a user interacts with it, there is no map reference to use.

It appears that standard @ViewChild methods for obtaining a dom reference do not work with the angular google-maps component. We could use a good example of how to get the map reference.

### Affected documentation page

https://github.com/angular/components/tree/master/src/google-maps/map-marker

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne in src/google-maps/map-marker und prüfe das vorhandene Dokumentationsbeispiel, das die Karte über ein mapClick-Ereignis abruft. Ermittle, wie die Kartenreferenz vor der Benutzerinteraktion aus component.ts abgerufen und an MapMarker oder InfoWindow übergeben werden kann. Als abgeschlossen gilt die Aufgabe, wenn die betroffene Dokumentation ein funktionierendes Beispiel zum Dekorieren der Karte vor der Interaktion enthält.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
angular, typescript
Bereich
documentation, frontend
Issue-Typ
Dokumentation
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.