I have D7.27
Location 7.x - 3.3
Gmap 7.x 2.9

Geocoding was working fine, enabling me to simply add City and Postcode data to a node and get a map to show
but it stopped working
Now, I can not get a map to show unless I input long and lat ONLY

Steps to reproduce:
install and enable the above modules
set Google API key in admin/config/services/gmap and admin/config/content/location/geocoding/gb/google
add a location to a node and try to get a map to show

I read https://www.drupal.org/node/1940654
but since it is from a year ago I am not clear if the patch in #16 has been applied to Gmap 7.x 2.9
?

Is there a simple solution for this?

CommentFileSizeAuthor
#12 google_geocoding-2406483-12.patch3.87 KBmralexho

Comments

gatorjoe’s picture

I am having the same issue. I attempted to apply patch #16 from https://www.drupal.org/node/1940654, but it does appear that is has been applied already. Any help would be appreciated.

olisb’s picture

I have now made a totally new installation of Drupal 7.31
and only added the following modules
Gmap 7.x-2.9+3-dev
Location 7.x-3.x-dev
Once I have set it all up with the required Google Maps API key etc I get exactly the problem:
No maps block shows on any content unless I enter Long and Lat manually which, to me at least, implies this is a bug.

olisb’s picture

I have now tested the vanilla D7.31 with the non-dev versions of these two modules:
Gmap 7.x-2.9
Location 7.x-3.3
and I get exactly the same result:
No maps block shows on any content unless I enter Long and Lat manually
anyone got any ideas on how to trouble shoot the geocoding any more?

olisb’s picture

finally, thanks to Alan Peart from Creative.coop I have got this working again by deleting the API key from both admin/config/services/gmap
and
admin/config/content/location/geocoding/gb/google

hackos’s picture

I have the same problem. There is no API key to delete in either location. Can only geocode using long/lat. I'd like to be able to geocode from postcode. Anyone got this working yet please?

trailrunner’s picture

Having this same issue. Going to try #4.

trailrunner’s picture

#4 did not work for me either.

web506’s picture

Same issue here.

Fatal error: Call to a member function asXML() on a non-object in /home/********/public_html/smdrupaltest/sites/all/modules/location/geocoding/google.inc on line 38

flyke’s picture

Same here: installed current version of location and gmap module, added a content type with a Location field and now when I try to configure the geocoding options on admin/config/content/location/geocoding I get a white page with the error:

Fatal error: Call to a member function asXML() on a non-object in ......\sites\all\modules\contrib\location\geocoding\google.inc on line 38

--> This is easily fixed by updating location module to the dev version.
In my case I used drush command: drush dl location-7.x-3.x-dev -y & drush cc all

So now I can access admin/config/content/location/geocoding :-)

droptimum’s picture

#9 worked for me (D 7.37)

hessam61’s picture

I'm experiencing the same thing. #9 fixes the issue with Geoocoding Options page not showing up, but it still doesn't gecode an address. I downgraded to 7.x-3.0, and geocoding works now. But I get WSOD on geocoding options page though. So to enable the geocoding first use the dev version, and then downgrade to 3.0.

mralexho’s picture

StatusFileSize
new3.87 KB

If you receive a response like Fatal error: Call to a member function asXML() on a non-object, download this patch and apply it to the Location module.

Reference Gecoding options crash in geocoding/google.inc

alex liannoy’s picture

Assigned: Unassigned » alex liannoy
Issue tags: +dcuacs2015
alex liannoy’s picture

Status: Active » Needs review

It looks like geocoding works fine. Issue description misses one step to make it work.
You need to choose proper geocoding service provider per country here - admin/config/content/location/geocoding.
https://screencloud.net/v/4qSI

Status: Needs review » Needs work

The last submitted patch, 12: google_geocoding-2406483-12.patch, failed testing.

moymilo’s picture

Status: Needs work » Closed (cannot reproduce)

Compleate all steps from description and step from #14 all works fine. You may add location not only by long and lat.