0

I implemented the configure() function. It worked for a few days but after that the map did not appear. There is only the search textbox which also doesn't work now. When I check the javascript console, I get the following errors:

Uncaught SyntaxError: Unexpected token {
js?key=AIzaSyAbGuidVmbHcyPb4OTEeGbH6ioYMW39GK0
&v=3.exp:39 Google Maps JavaScript API error: InvalidKeyMapError
https://developers.google.com/maps/documentation/javascript/error-messages#invalid-map-key-error
_.Nb @ js?key=AIzaSyAbGuidVmbHcyPb4OTEeGbH6ioYMW39GK0
&v=3.exp:39
(anonymous) @ common.js:58
(anonymous) @ common.js:155
c @ common.js:52
(anonymous) @ AuthenticationService.Authenticate?1shttp%3A%2F%2Fide50-vamol.cs50.io%3A8080%2F&4sAIzaSyAbGuidVmbHcyPb4OTEeGbH6ioYMW39GK0
&callback=_xdc_._d7iy4r&key=AIzaSyAbGuidVmbHcyPb4OTEeGbH6ioYMW39GK0
&token=46603:1

I read Google's documentation for what hat means, and I got to know that I have to get a new API key. I got a new key, set it, reloaded and updated my workspace, but nothing happened. I then backed up my scripts.js and replaced it wiht the one in the source code, but the map still doesn't load.

The error Unexpected token { is not an error, it is Handlebars' syntax. After searching about it, I realised that it is not an error.

3
  • Can you edit to include your code. It’s hard to debug when we can’t see the issue! – Tim Aug 9 '18 at 1:46
  • This is what Chrome showed in the console. – Amol Venkataraman Aug 13 '18 at 14:37
  • yes, I’m asking for the code you wrote that caused these errors. The contents of the configure function – Tim Aug 13 '18 at 14:43

You must log in to answer this question.

Browse other questions tagged .