When creating a new store location at https://mysite/store_locator/add, I am unable to generate a value in the latitude and longitude fields by clicking the "Find Lat/Long" button.

Steps to reproduce:

  1. Go to https://mysite.com/store_locator/add
  2. Enter store title and address
  3. Click "Find Lat/Long" button
  4. No values are produced in the relevant fields

I do get this in the console when clicking, however:

XHRPOST https://mysite/store_locator/add?ajax_form=1&_wrapper_format=drupal_ajax [HTTP/1.1 200 OK 701ms]

as well as a couple of Google Maps requests using my API key.

Any help would be appreciated. Thank you!

Comments

csanders created an issue. See original summary.

q__nt_n’s picture

Hi !
May be this issue (#3002261) will help you !
FYI, you need to activate Geocoding API and Maps JavaScript API

bsufan17’s picture

@q__nt_n your link is broken.

q__nt_n’s picture

q__nt_n’s picture

Status: Active » Postponed (maintainer needs more info)

@csanders
Could you tell me if the other issue (3002261) fixed your problem ?
Thanks

q__nt_n’s picture

Version: 8.x-1.1 » 8.x-1.2
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I can't reproduce this issue in 8.x-1.1 and 8.x-1.2. I closed this issue.

bsufan17’s picture

@q__nt_n I'm still having this issue. I have enabled the Geocoding API and I'm seeing requests on my API Key when I click the "Find Lat/Long" button. I get no results. I just installed the latest release of the module on a fresh install of D8. The maps work great, but the geocoding does not.

q__nt_n’s picture

Status: Closed (cannot reproduce) » Needs work

Thanks for your feedback.
I reopened this issue and I'm going to work on it tonight (I've a Drupal meetup contribution :) )

Could you add a screen of your store locator form ? (in order to test with the same address)
Thanks

bsufan17’s picture

StatusFileSize
new118 KB
new134.38 KB
new122.24 KB

@q__nt_n,

Here are a series of screenshots, as the behavior changes based on my actions.
First, image1.png shows what I see when I start to create a new "Store Locator." This is also what I see after clicking the "Find Lat/Long" button. Nothing really happens when clicking the button except a brief message that says "please wait."

Second, image3.png shows what I see after clicking on the gray area where a map should be displayed. If I click on that gray area I see a map and marker for a split second then it displays the error message and it does fill in the Latitude and Longitude fields, I'm assuming with the coordinates of where I clicked on what should be the map.

Finally, image2.png shows what I see if I click the "Find Lat/Long" button after the error from image3.png is displayed. Just a white screen.

I hope this helps.

q__nt_n’s picture

StatusFileSize
new2.45 MB

Hi !
Thanks for screenshots.
In image1, it's seems you have a problem with your map !
You should have a map visible from the beginning, You can see my video in the attached files.
Which Google API have you activated ? In my case, "Maps JavaScript API" and "Geocoding API" are enabled.

bsufan17’s picture

@q__nt_n Damn! Thanks for your time on this, I think I have it solved. My client did not set up the billing information for the API key. Thanks again! Sorry to have wasted your time.

q__nt_n’s picture

Status: Needs work » Closed (cannot reproduce)

No problem ! ;)