I have been looking at your Advanced Taxonomy Blocks module. But before I can really look at it I need to sort out some taxonomy and Views basic... My site will have numerous business type directories, country, region and city reviews, and classifieds. How is the best way to set up taxonomy for such a site? Plus I want users to be able add the locations themselves as I cannot find and neither do I want to type in every possible location - Freetagging? I want to be able to have an overall Business directory and Classified section that covers all countries and cities, but when the user is looking at a country, region or a city they are being pointed to the directory content only for that country, region or city... So when someone is viewing Switzerland country review, the business directory link and classified link point to the Swiss businesses or classified, Geneva links would only show Geneva businesses and ads etc... Do I create a Location vocabulary (Location) and have 3 depths of terms (Country name, Regions in that country and Cities in that region)..? I then get confused as how to display the content. I would have a Content Type for a County one for Region and one for City reviews, and then Content Types for the Business Directory and Classifieds... I am unsure how to associate a View to the sub term taxonomies unless they where separate vocabularies Country, Region, City (because they have a taxonomy ID?)? Thanks, Tim
Location and Geocoding in Drupal
Hi Tim,
Drupal's taxonomy is really not suited for keeping up with geographic information in a consistent way. For starters it would take far too long to manually input all the locations that may appear, and free tagging would lead to repetition and mistakes. I have seen one site that tried to handle location with taxonomy and it had all sorts of problems.
There are a couple of modules that handle location info for Drupal, each have their strengths and weaknesses (some of them more on the weak side).
The location module is probably the most well know module for adding geographical information to Drupal nodes. However it is nowhere near perfect. It currently only supports zip codes in the US, and it takes quite a bit of configuration that isn't easy to figure out in order to get geocoding working. I personally don't like the module very much.
Geonames is a interesting option. It works for most countries and provides all sorts of possibilities for getting longitude and latitude, proximity and more. Its weakness is that there it does nothing out of the box, and the modules that use it thus far are incomplete. It does however provide a well documented api which would make it easy for a competent module developer to make use of it. One other possible disadvantage to this module is that it uses an external service and does not have access to the place names until after the site request the information at least once.
Another module that is not very well known but in my opinion is very promising is the Addresses Module for Drupal 6 http://drupal.org/project/addresses. This module doesn't handle any geocoding, however it covers all countries and does not rely on an external service as far as I know. I would need to study this module further, but it might be your best option.
To really do anything useful with locations you will most likely need to have some custom code written. Most of the modules that try to handle mapping etc... in a generalized way usually make lots of unnecessary queries that will slow down your site.
I think it may be possible to write a module that does essentially the same thing as the Advanced Taxonomy Blocks but with locations, however I would need to look at the table structure for the Addresses module to see if it is really practical. As far as I know such functionality doesn't exist yet.
Thanks, what you have done
Thanks, what you have done here has helped me because it means I am kind of understanding the problems and modules, rather than thinking I was completely blind and missing the obvious.
Yes I saw that there wasn't something obvious for locations, and freetagging for me posed problems for duplicate keyword/tags filling up my database and inconsistencies in spelling or typos...
I don't know how this works, but sites that require that you add an address use javascript lists, that update when you select various options to narrow your options - choose France, it gives you the department, then choose the department it gives you the towns... can these not be 'read into' the taxonomy database perhaps from an XML script?
For locations... I was also
For locations... I was also looking at Hierarchical Select module as it had a way to add a taxonomy from the lists see demo here: http://wimleers.com/demo/hierarchical-select/taxonomy - so my editors could perhaps add the location as and when necessary? But I can't get the module to work yet and I am getting bugs so had to disable it.
As I am going to have an e-commerce part to the site I need the address database for that... not looked at how Ubercart handles addresses for checkout
Poster un nouveau commentaire