Hi:-

There might be a really obvious answer to this... But...

I'm trying to get Geofield to pull co-ordinates from an Addressfield field, using the "Geocode from another field" widget and the Geocode module, with Google Geocoder (default settings).

With this selected, nothing appears in the edit form; selecting any other widget displays an empty field.

Any ideas?

Thanks!

Simon.

Comments

netix’s picture

Category: support » bug
Priority: Normal » Major

hi,
I'am also experiencing that kind of behavior.
I guess it's expected that nothing appears when you edit the content as the location is already entered in another field,
but in my case, when the "Geocode from another field" is choosen, nothing appears in the content itself (as if the field was not there at all !).
I should add that if Longitude/Latitude is selected, Geofield works fine (event displays a neat map if asked!).

Maybe I am missing something, but I basicaly followed this tutorial. Or maybe the geocoding (transformation of an address in a latitude/longitude) form google is broken. I also tried with the other geocoders, but no success either.

Thank you!

johnv’s picture

It works fine for me, using 'ordinatiry ' nodes, Adressfield and Geofield 1.1.
The Geofield is NOT shown on the node edit page. This is not necessary, because it is filled 'behind the scenes' by Geocoder.
The Geofield IS shown on the node page or any view, shoosing the correct formatter.
Below my settings for the Geofield. Both Addressfield and Geofield have cardinality ('number of values') = 1.
- Geocode from field * :
- Geocoder * : Google Geocoder
- Geometry Type : Point (default)
- Number of values : 1

Hope this helps.

simondoyle’s picture

Thanks johnv - you were correct - the field exists, but it's just not displaying on the Edit page when using the "Geocode from another field" widget!

johnv’s picture

Category: bug » support
Status: Active » Closed (works as designed)

fine, good luck with your Drupal adventure!

askandlearn’s picture

I wrestled with this all afternoon. I finally discovered that I had to open the node and then save it and then magically the geofield values appeared. Then I went to manage display and turned on "display geofield map" for the field and voila, maps on nodes.

Now I need to learn how to automatically open and save 200 existing nodes.

nancygill’s picture

I have the problem in reverse. I created this site several months ago and all the locations appeared on the geofield map just fine. But now when new properties are added, the location is not being created and they do not appear on the map. Nothing changed, AFAIK. What could have made location stop being created from the address field?

lias’s picture

Not sure if this is the same issue but the problem I'm having is the same as this one on drupal stackexchange:
http://drupal.stackexchange.com/questions/39733/programmatically-update-...

From site***

My setup is:

  • Addressfield on nodes to collect address data
  • Geofield using "Geocode from another field" choosing the addressfield and the Google Geocoder

When I edit/save a node in the UI, the data is geocoded. However, I have thousands of nodes and am trying to write a script to update the geocode info on each node.
I tried loading all the nodes and doing a node_save() but the geocode hooks didn't fire.
How can I programmatically update the geofield information? Is there a hook I can use?
****end stackexchange post

I'm having the same problem in my proximity view. The nodes don't display unless I edit and then save. I tried a views bulk operations save but that didn't work since it doesn't affect geofield/geocode like editing a node does.

xbrianx’s picture

Issue summary: View changes

@#5 open and save was the trick! Life saver thanks.

David Blas Bray’s picture

#5 #8 What do you mean by open and save? I am having the same problem. It works perfectly on localhost and I have the same exact configuration online and it does not show. I have the field saved within the user profile. I have tried editing and saving and that hasn't worked. Thanks in advance.

xbrianx’s picture

@#9 It worked on a content node for me. I don't know about user profiles.

Clauce’s picture

Same as #9 : everything works perfectly on local machine, online, goefiled seems unable to geocode from adress field, my array is empty. I have no errors, nothing that points to the problem... has someone any idea ? Could it be something with the servor provider ? Thanks for your help.

katrien_w’s picture

Thanks a lot, #5 saved me too!
My geofields stopped displaying after a bulk update of a value on all nodes of the content type containing the geofield.
After opening and saving again, the maps reappeared.

lias’s picture

As mentioned in #5 and #9 and others, is there a way to open and save multiple geofields at once so that the maps will display? To reiterate, if a geofield is blank and only needs to be opened and resaved to work and display on a map how can this be automated to include 500 such nodes? I think that still remains as the question that has yet to be answered. If it has been answered please include a link to that solution. Thank you.

masher’s picture

I used the Feeds (+profile2_feeds) module to bulk update over 1500 user profile2 postcode fields to populate the geofield.

The Geofield was added after creation of the user profile pages.

Imported a CSV containing just postcodes and user IDs (unique field) into the profile nodes.

Guess it will work for regular content-type nodes too.

drupal_user213’s picture

Version: 7.x-1.1 » 7.x-2.3
Status: Closed (works as designed) » Active

I'm still facing this issue. I managed to get the Geofield map to display on my local environment after reading the thread and by editing and saving the node again. However, when I pushed it to my live site, no matter what I do, the map is not displaying. I can't even get it to display the other formats either. I even tried creating a new node and inputting new data, but still no luck.

I am not sure why this issue is being marked as "works as designed" as this shouldn't be the expected behavior. I'm running the latest version of the module (7.x-2.3) and it is still happening.

Any help would be appreciated.

najamfzl’s picture

even worse, I'm getting a blank field edit page, nothing is displayed, when I select "Geocode from another field" widget. I can't select the address field. I used the dev version but still the same problem.

NetBrowser’s picture

I am having the same issue in 2022, maps not showing in my drupal 7 website.
I got the coordinates if I use the widget for it but I got a blank space if I use the geofield_map.

Please let me know if someone had been able to solve it, I need to collect the location from the user creating the node with a map by entering the address or selecting ir from a map, not by introducing the coordinates manually, I don’t think that “work as designed” is ok, since it is supposed to work as described, to collect the address from the user, this is a new install so for me is not that I have to open and save, I am creating this nodes in test mode before I can get it to production.