Closed (fixed)
Project:
Geofield
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Mar 2011 at 15:31 UTC
Updated:
28 Sep 2011 at 22:29 UTC
I know it's a bit off the grid, but just throwing something on the table.
addressfield ( http://drupal.org/project/addressfield ) is THE most promising and "famous" project for storing addresses on D7.
geofield is going to be THE module used for storing geolocation data for D7.
Currently there is no complete solution for entering and storing address data, geolocating them and displaying them on a map.
addressfield takes care of the address storing, geofield takes care of storing the coordinates data, openlayers/location takes care of displaying the data...
All that's missing is a link between the 2 first steps.
Any thoughts on this?
Comments
Comment #1
phayes commentedYes, i've been thinking about this. I've got a solution started by porting geocode module to D7 here: http://drupal.org/project/geocode
It currently works for textfields, images, and gpx files. Let's work on it at github and get it working with addressfield and polish it up a bit. Once that's done we'll see if allie wants to port in back into d.o - if not we will include it as a submodule here.
Comment #2
phayes commentedWait sorry, bad link. Github of D7 geocode is here: https://github.com/phayes/geocode
Comment #3
aristeides commentedUnfortunately I can't help with porting the module (lack of knowledge) but I can do extensive tests and bug reporting...
I posted this on the addressfield issue queue as well here: http://drupal.org/node/1093392 to get things started.
I'll try the geocode module later tonight, I was really glad to see your response!
Comment #4
elioshHope to hear good news ASAP :-)
Thanks for the great and good work.
Comment #5
rorymadden commentedI get the following errors when I try to create a GeoField with a widget of "Geocode from another field "
When I try to save the field I get the following errors:
If I edit the field again and click save I get the following errors:
These are issues with the geocode module but as it is hosted on github there is no issue queue for me to post against.
Thanks
Comment #6
phayes commentedQuestion: Does the geocoding actually work despite these notices? (Of course this is still a valid complaint - I tend to do my developing with notices turned off - likely a bad idea.. )
Comment #7
rorymadden commentedWhen I try to create a piece of content I get the following errors.
The content is saved and the text field that I have linked to my Geofield is populated but nothing was saved in the Geofield field.
Comment #8
phayes commentedAlright. I spent today doing a complete overhaul of geocode module over at https://github.com/phayes/geocode
As far as I can tell, it works! Please download and try again.
Note that you will need the latest version of geoPHP over at https://github.com/downloads/phayes/geoPHP/geoPHP.tar.gz
Comment #9
aristeides commentedSorry I wasn't able to test anything for a couple of weeks but I have a strict deadline on a project I'm working on... I' ll give it a try probably later today.
Comment #10
rorymadden commentedThis is looking a lot better. Thanks. Steps I followed:
Installed:
Addressfield (alpha1)
Geofield (alpha1)
Geocode (github)
Libraries (1.0) - and installed latest GeoPHP
Ctools (alpha4)
OpenLayers (alpha1)
I am using Php 5.3.3
I added a Google Maps API key to OpenLayers
Create new content type with Address Field and Geofield with Widget: "Geocode from another field" (Addressfield)
After setting up the field Geofield on my content type I get the following errors:
Notice: Undefined index: language in geocode_widget_validate() (line 196 of /home/quickstart/websites/example.dev/sites/all/modules/geocode/geocode.module).
Notice: Undefined index: language in geocode_widget_validate() (line 196 of /home/quickstart/websites/example.dev/sites/all/modules/geocode/geocode.module).
Notice: Undefined index: language in geocode_widget_validate() (line 196 of /home/quickstart/websites/example.dev/sites/all/modules/geocode/geocode.module).
I create a piece of content and it works!! There is data now being stored in my geofield. Woohoo
Display Type: OpenLayer
However when I set the display type of the geofield to OpenLayers with Full Geometry option I get the following error:
Notice: Undefined index: format in geofield_field_formatter_view() (line 71 of /home/quickstart/websites/example.dev/sites/all/modules/geofield/geofield.formatters.inc).
Openlayers outputs a line: Can't output openlayers yet
Display Type: Lat/Lon, lat only, lon only, geometry type
These work fine
Display Type: GeoJSON, WKT
The value displays but I get the following error
Notice: Undefined index: format in geofield_field_formatter_view() (line 71 of /home/quickstart/websites/example.dev/sites/all/modules/geofield/geofield.formatters.inc).
This looks like its almost there (although I may have missed a set up task). Thanks
Comment #11
phayes commented@rorymadden,
It doesn't sound like you've missed anything. That's the state of things at the moment - basically working with a lot of rough edges. Thanks for testing. I'm going to mark this as needs work for now while I clean up the rough patches.
Comment #12
aristeides commentedJust wanted to confirm... same errors for me, but it almost works!!! :D
Comment #13
Shadlington commentedSubbing
Comment #14
phayes commentedThe errors should now be gone and D7 geocode is basically stable (as far as I can tell). Please test!
Comment #15
rorymadden commentedNo more errors! Thanks for that. However I am still getting the line "Cant output openlayers yet." when I set the display type to OpenLayers.
Is this a setup issue, an issue with geocode or an issue with OpenLayers? (I followed the same setup as before - #10)
Thanks again.
Comment #16
aristeides commentedEverything seems to works flawlessly!
Comment #17
michaelfavia commented@rorymadden - openlayers isnt a supported display formatter yet IIRC.
@phayes - excellent work. You saved me a ton of glue and matchsticks today and i owe you a beer at the next drupalcon.
Comment #18
phayes commentedAlright i'm marking this as fixed
Comment #19
phayes commentedComment #21
vasikeIt seems that it's not working with latest dev version of the modules : Addressfield, Geofield, Geocode (github), OpenLayers
It won't saved any Geo data for the Geofield. No errors
Comment #22
g76 commentedsub
Comment #23
Loikkk commentedsub
Comment #24
Loikkk commentedComment #25
vasikei discover 2 reasons for this issue
1. for the AddressField values in a multilingual drupal
The field won't use the right Language Key, instead it uses the the 'und' key
Possible Solution
This could be solved but enabling the Entity translation module & both the Geofield & the Addressfield have th "Users may translate this field." option Checked
2. The Geocode Google for the Addressfield data won't work if the php "allow_url_fopen" is Off
Anyway i'm not sure this is an issue for this module.
Comment #26
pixelmord commentedThe workaround of #25 works for me, but that shouldn't be done like this, no?
In a content translation setup with nodes beeing translated, the fields should receive the correct language key automatically. Or am I missing something here?
Comment #27
jaxxham commentedHi there, the geocode module has suddenly started returning this error when trying to save an address field:
Notice: Uninitialized string offset: 0 in geocode_widget_validate_walkthrough() (line 247 of ... /sites/all/modules/phayes-geocode-281c70f/geocode.module).Any ideas?
Comment #28
itserich commentedI am getting the same error as in #27, when a node is saved.
Also, I was getting an error for Content Type B (Geocode Demo)when I was saving Content Type A - unrelated Content Types.
I deleted Content Tye B and that error now does not appear when a node is saved, but the error reported in #27 remains.
The mapping for the individual node and an aggregate node map both appear to work fine. The area where it does not work is the Proximity module.
I am using
Address Field 1.0 Beta
OL 7 2.x Dev
OL Proximity 7 2.x Dev
Using Google Geocoder from the Address Field.
Comment #29
Brandonian commentedThis error doesn't seem to happen when you use the latest versions of Addressfield (7.x-1.0-beta2), Geofield (7.x-1.0-alpha4), and the Treehouse Agency version of Geocode (https://github.com/treehouseagency/geocode).
I also have a fork of Geocode (https://github.com/fillerwriter/geocode) that I plan on keeping up to date with bug fixes.
Comment #30
itserich commentedWhen I try both geocode versions in # 29 I get this error when saving a node:
It appears tobe the same error as in # 27 with a different line number.
I think I am using the latest Address Field and OpenLayers.
I don't know if anything needs to be done when switching geocode versions, I ended up clearing cache.
Comment #31
Shadlington commentedI'm struggling to get this to work...
I think the problem is that geocode isn't working - no data is being saved in my geofield.
Does anyone have any idea why that might be the case? I have followed the same steps as in #10.
Comment #32
tvilms commentedI'm struggling with the same problem in one of my D7 implementations - but not the other - and I can't for the life of me isolate what's different between the two implementations. One is geocoding just fine, the other isn't.
One thing of note is the error message I'm getting in the non-working implementation. It's different than what others are showing here in this thread:
"Notice: Trying to get property of non-object in GoogleGeocode->read() (line 51 of .../public_html/sites/all/libraries/geoPHP/lib/adapters/GoogleGeocode.class.php)."
I'm using:
D7.7
CTools 7.x-1.0-rc1
OpenLayers 7.x-2.x-dev
Geocode (tried three diff versions on github)
Geofield 7.x-1.0-alpha5 (tried multiple older versions)
Address Field 7.x-1.0-beta2 (tried several older versions)
Libraries 7.x-1.0
geoPHP from PHayes
Tried both GoogleMaps API v2 (with key) and v3.2
Has anyone debugged these issues and gotten to the point where Geofield is successfully storing data geocoded from the address field? Please tell how.
Comment #34
nagiek commentedopening again because it doesn't seem like it's fixed.
subscribe
Comment #35
nagiek commentedalthough I should say it works fine for me with the Treehouseagency release. Maybe it depends on the quality of your address?
Will geocode 7.x be released using these combined modules?
Comment #36
michaelfavia commentedThis issue has been resolved by phayes and indytechcook work on the geocoder module which geocodes addresses into geofield points. You can get it from their github repositories linked above or a new project created to house it on drupal.org. Im trying to recentralize the work on this project on drupal.org and welcome any competent comaintainers to push it forward.
http://www.drupal.org/project/geocoder