NativeScript / NativeScript/plugins
Google Maps myLocationEnabled
未关闭
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 206
- 派生
- 123
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 1
描述
Hi,
I'm trying to enable the "My Location" button. This worked previous but now appears to not work. Any ideas what I may be doing wrong?
onMapReady({ map }: { map: GoogleMap }) {
geolocation.enableLocationRequest(false, true)
.then(() => {
geolocation.isEnabled().then(isEnabled => {
if (!isEnabled) {
return;
}
map.myLocationEnabled = true;
});
});
}
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先根据 onMapReady 片段复现报告中的行为,重点关注 geolocation.enableLocationRequest、geolocation.isEnabled 和 map.myLocationEnabled。检查 Google Maps plugin 的实现,并确定为什么启用位置控件不再生效;在确定一个可复现的原因并确认按钮恢复工作后,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- mobile
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100