Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The Geocode module provides a geocode class, and standard methods, that can be extended for different geocoders. Document these functions following the Doxygen formatting conventions (http://drupal.org/node/1354) providing information on their use, parameters, and return values.
(patch to follow :)
Comment | File | Size | Author |
---|---|---|---|
#1 | geocode.737076-1.patch | 14.88 KB | ekes |
#1 | geocode_tests.736214.737076-1.patch | 975 bytes | ekes |
Comments
Comment #1
ekes CreditAttribution: ekes commentedPatch also changes class, method and property names based on the coding standards http://drupal.org/node/608152 and defines the main public methods in an interface (as per page). As the module already requires PHP 5.2 it drops all the PHP 4 class definitions.
Functionality has intentionally not been changed. With one patch to the tests (for the class name - also attached) they run the same. It would be nice, if maintainers are agreeable, to investigate changing the error reporting from geocode method, adding more helper functions into GeocodeBasic for json (and xml) parser error handling. Certainly it would make it easier from what little I've done developing on a Geonames class. Using ctools for loading would be cool too maybe?
Comment #2
ekes CreditAttribution: ekes commentedNaturally.
Comment #3
ekes CreditAttribution: ekes commentedLast one from me until feedback I promise. But does it make sense that the geocoder (not the geocoder_widget) is more consistent with the geo module? Something like:-
I've not quite got my head round the creation of the GeometryTypes. I take it there's a factory that I'm not quite using right, or needs a bit of tweaking for GeometrySimple for this case? But it seems it would then make it easier for modules using the geo api to convert consistently to what they need? Just a thought, if it's a good idea, I'll happily help. Other ideas good to :)
Comment #4
ekes CreditAttribution: ekes commentedShort follow up on #3. I've thought the same simple classes for geometry types would help here #623428: Provide hook_feeds_user_processor_targets_alter() see comment #21 Any feedback would be great.