Here api {状态:401,消息:“无效应用程序id应用程序代码组合”}
我正在运行一个angular应用程序,使用此处映射api密钥进行身份验证。但我得到{状态:401,消息:“无效的应用程序id应用程序代码组合”}当我根本不使用应用程序id或应用程序代码时 使用搜索api时会发生此错误。下面是我的搜索工作原理的示例:Here api {状态:401,消息:“无效应用程序id应用程序代码组合”},here-api,heremaps,Here Api,Heremaps,我正在运行一个angular应用程序,使用此处映射api密钥进行身份验证。但我得到{状态:401,消息:“无效的应用程序id应用程序代码组合”}当我根本不使用应用程序id或应用程序代码时 使用搜索api时会发生此错误。下面是我的搜索工作原理的示例: public places(query: string) { this.map.removeObjects(this.map.getObjects()); this.search.request({ &q
public places(query: string) {
this.map.removeObjects(this.map.getObjects());
this.search.request({ "q": query, "at": this.lat + "," + this.lng }, {}, data => {
for (let i = 0; i < data.results.items.length; i++) {
this.dropMarker({ "lat": data.results.items[i].position[0], "lng": data.results.items[i].position[1] }, data.results.items[i]);
if (i == 0)
this.map.setCenter({ lat: data.results.items[i].position[0], lng: data.results.items[i].position[1] })
}
},
error => {
console.error("hello"+ error);
});
}
公共场所(查询:字符串){
this.map.removeObjects(this.map.getObjects());
search.request({“q”:query,“at”:this.lat+,“+this.lng},{},data=>{
对于(设i=0;i{
console.error(“hello”+error);
});
}
您能给我们提供更多关于您使用的API和端点的详细信息吗?如果你能在出现错误的地方发布这一行也会有帮助。谢谢@Shutikuber,我刚刚做了编辑。你能发布你用于搜索请求的url吗?