这是什么意思?(Google Maps API)

New*_*ing 4 google-maps

我在控制台中收到此错误消息.有谁能解释为什么?并且页面正在运行.

js?key=MyAPIKey&v=3.exp&libraries=places,drawing,geometry:32 InvalidValueError: not an instance of HTMLInputElement_.ab @ js?key=MyAPIKey&v=3.exp&libraries=places,drawing,geometry:32
Run Code Online (Sandbox Code Playgroud)

Jai*_*oni 11

InvalidValueError: not an instance of `HTMLInputElement`
Run Code Online (Sandbox Code Playgroud)

这意味着你没有设置你的html输入元素的正确id.Google API无法在您的HTML代码中找到该控件.因为输入元素的id错误.

如果你使用textarea那么它将无法工作,因为谷歌地图自动完成现在只支持window.HTMLInputElement(input tags)

有关详细信息,请查看此链接

您还可以在此处找到Google Map API的示例