Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Google Maps Addon with API Key
Hi Tapio,
I have embedded a google map addon component in my webpage, hosted with glassfish 4.1 on a server with a public IP address. When I go to the page via http://{public.IP.address}:{portNumber} everything is fine, but when I push it through my dns host and access it though http://www.testpage.com/, this error
"Opps Something went wrong. This page didn't load Google Maps correctly. See the JavaScript console for details." appears. I then checked the console and found the following error:
Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error_.bb @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:35(anonymous function) @ common.js:52(anonymous function) @ common.js:224d @ common.js:46(anonymous function) @ AuthenticationService.Authenticate?1shttp%3A%2F%2Fmonitoring.iese.co.nz%3A8888%2F%23!Map&callback=_…:1
util.js:221 Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keysuD.S @ util.js:221(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:130(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:50(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:47(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:50_.M @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:50(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:50_.Qb @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:45oc @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:50(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:130
util.js:221 Google Maps API warning: RetiredVersion https://developers.google.com/maps/documentation/javascript/error-messages#retired-versionuD.S @ util.js:221(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:130(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:50(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:47(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:50_.M @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:50(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:50_.Qb @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:45oc @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:50(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:130
util.js:221 Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-requireduD.S @ util.js:221(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:130(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:50(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:47(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:50_.M @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:50(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:50_.Qb @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:45oc @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:50(anonymous function) @ js?v=3.10&sensor=false&APIKEY=AIzaSyC_6duBz-bGB42XVZiEXqoU6r8w0wz_ido&libraries=&callback=google.lo…:130
I then followed the link in the error message and obtained an apikey:
https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
then ensured that my google map component was initiated with the API key that I have acquired
String apiKey = "mYaPiKeY";
GoogleMap googleMap = new GoogleMap(apiKey, null, null);
but it still doesn't solve the problem. Can you please provide some tips?
Cheers
Jason
Hi,
I have the same error. In my local environment it works fine, but when my aplicaction is running in a server with a public IP I got the same error "Opps Something went wrong. This page didn't load Google Maps correctly. See the JavaScript console for details."
In the java Script console:
Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error
_.hb @ js?v=3.10&sensor=false&APIKEY=XXXXXXXXXXXX&libraries=&callback=google.lo…:37
util.js:210 Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
uE.j @ util.js:210
util.js:210 Google Maps API warning: RetiredVersion https://developers.google.com/maps/documentation/javascript/error-messages#retired-version
uE.j @ util.js:210
util.js:210 Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required
uE.j @ util.js:210
I notice the paramenter name is 'APIKEY' instead 'key'. I don´t know what I missing. I hope can you provide some tips.
Thanks
Ingrid
Just to update, I fix de problem doing redeploy my project, with the last version of GoogleMaps Add-on 1.3.4