-1

My test site under development utilizes Google Maps JavaScript API client geocoder. When the site runs under local host, the latitude and longitude are returned correctly and are then properly utilized by my js scripts. However, when the identical site runs under the virtual host I have created for the project, nothing is returned by the API. In fact, it doesn't work.

To my surprise in both of these cases the same code is executed. I am running Apache 2.4.23 in WAMP

To confuse things even more, a simple google maps call for a contact page renders correctly in both the localhost and virtual host. Only this aspect of google maps works within the site with the only distinction being the call does not utilize the JavaScript API geocoder.

In both

Any assistance would be greatly appreciated. Thank you in advance.

Regards Jack Kut

  • 3
    do you have an API KEY? Do you get any useful error messages in the **developer** tools console of your browser? Is the local host http and the virtual host https perhaps?? But most importantly, do you get any useful error messages in the browsers **developer** tools console – Jaromanda X May 11 '17 at 00:52

1 Answers1

0

Jaromanda X. Thank you for your reply. Yes I have an API key. I also should mentioned WAMP is confirgured with Chrome. I have tried both https and http in virtual host and neither works for the geocoder call.

The url in the code is https and it works in local host. Ive tried changing in to http in virtual host with no luck. What is interesting https works in virtual host for a straight forward google maps call despite other comments in stackoverflow.

Under the developer tools the script call

shows == $0

It appears the code in virtual host unlike in local host does not properly link with google maps geocoder for some reason despite the url path being identical in both host environment.

Jack