0

why can't maps appear, as if it was blocked from net. i don't know how to fix it. enter image description here

var platform = new H.service.Platform({
    'apikey': '{API-KEY}'
});
var defaultLayers = platform.createDefaultLayers();

var map = new H.Map(document.getElementById('mapContainer'),
    defaultLayers.vector.normal.map);
  • 401 error is due to permission issue. For some reason your application is not able to load some script files and as a result having errors in js codes. Its either an issue with the google map account that you are using or your web server where the script loading is being blocked. – Rahatur Aug 23 '21 at 15:03
  • When I first created the entry, I used the appid as an api key, and the same error occurred. Please follow the steps below to solve your problem. – Jason Pan Aug 24 '21 at 09:07
  • If my reply is helpful, please accept it as answer(click on the mark option beside the reply to toggle it from greyed out to fill in.), see https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work – Jason Pan Aug 25 '21 at 07:17

1 Answers1

0

1. Please login your here developer home page, and find below content.

enter image description here

2. You can click create API key button, and use it in your code.

enter image description here

3. Then you can run your project to test.

enter image description here

enter image description here

Jason Pan
  • 15,263
  • 1
  • 14
  • 29