Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
608 views
in Technique[技术] by (71.8m points)

api - 此处映射{“错误”:“未经授权”,“ error_description”:“ ApiKey无效。 找不到ApiKey。”}文档错误(Here Maps {“error”:“Unauthorized”,“error_description”:“ApiKey invalid. ApiKey not found.”} Documentation Error)

https://developer.here.com/documentation/maps/dev_guide/topics/routing.html

(https://developer.here.com/documentation/maps/dev_guide/topics/routing.html)

{"error":"Unauthorized","error_description":"ApiKey invalid. ApiKey not found."}

I am using here maps api for routing and it's showing api key error key not found when i am passing key parameter in json format

(我在这里使用maps api进行路由,当我以json格式传递key参数时,显示未找到api key error key)

// Instantiate a map and platform object:
var platform = new H.service.Platform({
  'apikey': '{YOUR_APIKEY}'
});

The maps is working find when i pass the key as simple string i don't know if there is any error in documentation or at the api please update this on your site and check it once

(当我将密钥作为简单字符串传递时,地图正在工作,我不知道文档中是否存在任何错误或在api中,请在您的网站上对此进行更新并检查一次)

the working code is below:

(工作代码如下:)

// Instantiate a map and platform object:

(//实例化地图和平台对象:)

var platform = new H.service.Platform({
  'apikey': 'YOUR_APIKEY'
});

just remove "{}" and it is working find

(只需删除“ {}”即可找到)

  ask by Abhay Vishnoi translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

Please log in or register to reply this article.

OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...