angular / angular/components

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

未关闭
#24,042 1 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看
area: google-maps docs P3
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

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

贡献指南

打开贡献指南

调研方向

从 src/google-maps/map-marker 开始,查看现有的文档示例,该示例通过 mapClick 事件获取地图。确定如何在用户交互之前从 component.ts 获取地图引用,并将其传递给 MapMarker 或 InfoWindow。当受影响的文档包含一个在交互之前装饰地图的可运行示例时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
documentation, frontend
Issue 类型
文档
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。