Needs work
Project:
GeoNames
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
21 Oct 2009 at 11:59 UTC
Updated:
21 Jan 2011 at 17:28 UTC
Currently I'm using the Hierarchical Select widget for Geonames (#437312: Hierarchical Select widget for Geonames) to store the geonameid into a CCK text field. The problem was that there wasn't a way to display that in a nice way on node page.
So I've made this little module that implements a hook_field_formatter_info so it can display the whole hierarchy.
I think there is some potential here: there can be an admin page where you can add different formatters (like imagecache does) for example to display only the Country/Town/Lat/Lon, etc.
This is only a stub, but if there is interest from the Geonames maintainers in this approach I can further continue developing it.
| Comment | File | Size | Author |
|---|---|---|---|
| geonames_content_1.patch | 2.26 KB | andreiashu |
Comments
Comment #1
andreiashu commentedThe patch is against the latest dev version of geonames.
Comment #2
andreiashu commentedI'll be working on a solution where you can build Geoname display presets (like in imagecache) so this means that the user will have a default preset installed (lets say Hierarchy) but at the same time she will be able to add new display presets.
I'll post the updated patch here.
Comment #3
alex andrascu commentedany update on this one ?
Comment #4
andreiashu commented@alex_andrascu: I didn't have time to work on this unfortunately. But I didn't abandon the idea, I just need have a few days free...
Andrei
Comment #5
alex andrascu commentedI've been messing a little with http://drupal.org/project/dependent_fields and plain CCK text field with allowed values retrieved from geonames. I might be able to tame it in the end (it's working eratically right now) but it might just make more sense the way you've put it. Care to share with me your solution for getting HS to work with a CCK field ?
Right now i have one field with PHP allowed values like this:
I'm interested in getting either another field containing cities or just store the hierarchy in the same field.
Thanks alot for getting back.
Alex