angular / angular/components

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

Open
#24,042 1 comment 4 reactions 0 assignees View on GitHub
area: google-maps docs P3
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

### 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

Contributor guide

Open the contributing guide

Research direction

Start in src/google-maps/map-marker and review the existing documentation example that obtains the map through a mapClick event. Determine how the map reference can be obtained from component.ts before user interaction and passed to MapMarker or InfoWindow. Done means the affected documentation includes a working example for decorating the map before interaction.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
documentation, frontend
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.