Skip to content

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

@SheldonHage

Description

@SheldonHage

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

Activity

added
docsThis issue is related to documentation
needs triageThis issue needs to be triaged by the team
on Dec 1, 2021
amysorto

amysorto commented on Dec 20, 2021

@amysorto
Contributor

It seems like this was fixed in #23856, I'll leave this issue open to update documentation

added
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
and removed
needs triageThis issue needs to be triaged by the team
on Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: google-mapsdocsThis issue is related to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @amysorto@SheldonHage

        Issue actions

          docs(maps): Describe how to get map instance from within component.ts to input to MapMarker, InfoWindow · Issue #24042 · angular/components