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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…