Hi,

So my Google Maps Javascript API Key is right, as it's currently displaying Maps as it should. However, upon subsequent calls with the key while attempting to use the autocomplete field, the authorization breaks and I get the "This API project is not authorized to use this API" error.

Any idea why?

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gwolfman created an issue. See original summary.

gwolfman’s picture

Issue summary: View changes
MarcoPBazz’s picture

I've noticed this error too but only if the field is required. If not it work properly.

Here's other configuration of my field:

  • Hide the postal code - checked
  • Show map - checked
  • Reveal widget - checked
  • Visible widget - checked
  • Draggable widget - checked
  • Palces type - geocode
  • single value field

Also I'm using latest version of addressfield and latest dev version of this module

GAMe’s picture

I too was just about to log this issue :-/ glad its not just me.

This is causing some serious issues for me. Wonder if anyone is working on a fix?

GAMe’s picture

FileSize
36.68 KB

Here is a screen shot of my error and the field is unusable for me at the moment :-/

I am too using the dev version of gmap, addressfield_autocomplete and the latest stable version of addressfield. I have also just tested this with the latest version of Geocomplete however that hasn't made a difference. I have also applied this patch https://www.drupal.org/node/2818471 to Gmap to avoid the sensor warning.

I also tested to see if it worked if I made the field not required and sadly I still have the issue.

GAMe’s picture

Priority: Normal » Major
MarcoPBazz’s picture

Hi Game! I'm trying to figurite out what could be the issue and where try to patch.

I confirm that https://www.drupal.org/node/2818471 is not related, not sure if those two issues are:

  1. https://www.drupal.org/node/2534664
  2. https://www.drupal.org/node/2858976

Are you using a multi value field?

GAMe’s picture

Hi MarcoPBazz,

Thanks for your response, the field I'm using is used on user registration and is not a multi-value field.

I have the following options set:

Address form (country-specific)
Hide country when only one is available
Default Country set to UK
Reveal Widget
Show Map
Place types set to geocode
draggable markers
visible markers
HTML5 geocode

If I get some time today I will try and play with the settings to see if any difference is made. If there is anything you would like me to do such as installing devel and providing output I'm more than happy to do so just drop me some instructions.

Thanks again :-)

Daniel Coy’s picture

Hello!

I resolved my issue going here Google API Places

and activating my google places API.

Was so weird because I can't find it from google developers console, but once I activated from the url above (I had to find that by google) was solved. I hope it can help anyothers.

Thanks!

tamonten1’s picture

Hi.
1. I apply the patch https://www.drupal.org/node/2818471
2. on https://console.developers.google.com/apis/ add " Google Places API Web Service", "Google Maps JavaScript API"
3. insert api key in gmap
4. finally, It work!

sorry for my english ))

retiredpro’s picture

Thanks tamonten1! I had "Google Maps JavaScript API" enabled but not "Google Places API Web Service". It works for me now.

apaderno’s picture

Priority: Major » Normal