Azure-Samples / Azure-Samples/AzureMapsCodeSamples

When attempting to initialize the GeolocationControl, a TypeError is thrown indicating that atlas.control.GeolocationControl is not a constructor.

未关闭
#198 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
373
派生
468
PR 合并指标
30 天内没有已合并 PR

描述

TypeError: atlas.control.GeolocationControl is not a constructor
at Bing.js:80:18
at atlas.min.js:105:1044990
at Map.forEach ()
at kN._invokeListeners (atlas.min.js:105:1044922)
at kN.invoke (atlas.min.js:105:1044600)
at t.l (atlas.min.js:105:1125510)
at t.fire (atlas.min.js:55:10455)
at t. (atlas.min.js:105:160507)
at t.fire (atlas.min.js:55:10455)
at mt.fire (atlas.min.js:55:10742)

Steps to Reproduce

1.Initialize Azure Maps with the standard setup
2.Attempt to create a GeolocationControl instance
3.Error is thrown at runtime

reference:
https://github.com/Azure-Samples/AzureMapsCodeSamples/blob/main/Samples/Device%20Sensors/Geolocation%20control/Geolocation%20control.html

贡献指南

打开贡献指南

调研方向

打开引用的 Geolocation 控件示例,检查 Bing.js:80 处的初始化,然后将其与复现步骤中描述的标准 Azure Maps 设置进行比较。当该示例能够创建 GeolocationControl 实例且不出现报告的 TypeError 时,即表示完成。

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

评估

技术栈
azure, javascript
领域
frontend, web-dev
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 发到你的邮箱

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