How do you associate locations with taxonomy terms?

I have been searching all day and do not see how to do this

Comments

netentropy’s picture

I meant to ask also , can I make the State and City field be the taxonomy?

rabidrabbit’s picture

I"m trying to figure out the same thing...did you ever figure anything out?

webdevbyjoss’s picture

Hi, guys

I have the same question!
Does anyone managed to resolve the issue?

yesct’s picture

Issue tags: +location taxonomy

tagging

yesct’s picture

Status: Active » Postponed (maintainer needs more info)

check some of the other location taxonomy issues to see if you can find a lead on your answer there. (see the tag on this issue)

iparsin’s picture

With Taxonomy Location turned on, you can assign a location to a term of your taxonomy. I could not think much about the benefit to use it. But maybe something like locating a type of products into a particular warehouse (node->term->location). I actually want to do the opposite, I want to attach each location to a term of taxonomy which can be done manually.

Anonymous’s picture

@6: very useful when you have a Vocabulary 'Locations', with each term a Location, like "Eiffel tower", "Big Ben", "Empire State Building". Then you can tag content with locations.

Also very useful for a vocabulary "Stores". You have "Product" nodes that you can tag with (one or more) "Store" locations that sell the product.

scalp’s picture

Can that info then be used with Views? I don't see anyway to do that. I can see how this would be useful as in the example in #7, but if it won't work with Views it definitely is not as useful.

mrfelton’s picture

The example in #7 is exactly what I need, but I cant see a way to get the term location data in to views.

http://drupal.org/project/geotaxonomy does it, but it doesn't provide the map for selection of location.

wjaspers’s picture

Is there a reverse of this module available? Wherein I can associate taxonomy terms with the location? My idea is to categorize locations based on "country" and or "province".

What would truly be ideal is if the Location core managed a taxonomy or separate taxonomies based on the "country" and/or "province" and/or "city" automatically.

YK85’s picture

I have taxonomy vocabulary "train stations" where each taxonomy term is a station name. Users create a node and can select up to 100 stations. I want to show on a map each station and the number of nodes that selected that specific station. Is this possible?

wjaspers’s picture

In your case, it sounds more appropriate to use Node Locations and just create each Train Station as its own node.
You can then specify each station's location in the Node create form.
I don't quite understand what you mean about "users can create a node and can select up to 100 stations"?

If you want users to reference your stations, create another content-type which they can edit, and then add (using CCK Node Reference) a field which allows user's to reference your 'train station' nodes.

YK85’s picture

Users create a Content Type called "Profile" where they input all their information. On this node edit form the user also selects multiple checkboxes of nearby stations (content taxonomy fields). I am using taxonomy terms for each station (there is 2000+ plus stations).

I hope the above better explains my situation.

Many thanks!

interestingaftermath’s picture

I have taxonomy vocabulary "train stations" where each taxonomy term is a station name. Users create a node and can select up to 100 stations. I want to show on a map each station and the number of nodes that selected that specific station. Is this possible?

I'm also wondering about this. I have a taxonomy setup where I am entering the locations. Then on my nodes, I'm allowing users to select that term. I would like to show the map that's associated with that. I imagine I could just use taxonomy_get_term or whatever and load the information. Wasn't sure if that's the easiest way though.

iparsin’s picture

I am not 100% certain about what you want to accomplish. But it sounds like Location (location taxonomy), Gmap, and Views would do. Basically, you set up location for each term(station) and once nodes were created and associated with those terms, use Views to list all terms, display = gmap, and the popup on map will contain those nodes like...

station A, on location a...
-node1
-node2
Station B, on location b...
-node3
-node4
-node5

Hope this helps,
iparsin

rooby’s picture

Status: Postponed (maintainer needs more info) » Active

The location_taxonomy module allows you to set locations on taxonomy terms. You can control the settings (number of locations, which location fields to collect etc.) per vocabulary.

Pretty much all this does is allow you to link terms to locations. It currently doesn't output this information anywhere.

There is not currently any views support, for this see this feature request - #429548: Add taxonomy term Views support for the location module

If you want to print the terms location data on nodes that have that term see this support request for details on how to accomplish this in your theme - #1012826: Using Location Taxonomy, how do I display location on node?
If you think there should be some built in functionality that does this check for feature requests of this nature or create one if it doesn't exist.

@wjaspers (#10):

Is there a reverse of this module available? Wherein I can associate taxonomy terms with the location?

The location_taxonomy module associated locations with taxonomy terms, isn't that exactly what you are after?

gman_’s picture

http://drupal.org/node/734020#comment-3479696 - I wanted to get this as well. Take existing node location data and synchronize this with taxonomy information. For example all a user has to do is click somewhere on the map when selecting a site, and the country->state->city information would automatically be filled into a hierarchical vocabulary. That way you would not have to update both with the same information, it would be kept in sync on its own after the correct settings have been put in place.

rooby’s picture

Oh ok, I understand now.
You want vocabularies where the terms are the location information. So country, state, city etc. can be terms of a vocab based on what was selected on a map or entered into the location fields.

Well for a start, the location module definitely doesn't provide anything like this currently.

As far as implementing the feature goes, it will probably need some thought.
It doesn't really sound like functionality that belongs in this module as it is not really what the purpose of this module is. This module is about assigning locations to things, like nodes, users and taxonomy terms.
It isn't really about creating terms and vocabs and things based on locations.

This is more of an edge case add on to the location module.
Which makes me think it sounds like something that would be better in a new module, external to the location module, like a location auto term module or something.
For example, another module could hook into the node/location saving process and then do the necessary creation/assigning of taxonomy terms based on the location information.
There should be enough drupal and location hooks to make this possible.

gman_’s picture

Thank you very much for the response rooby! I understand now that this indeed is outside the scope of location and should be implemented in a totally separate module.

Maybe one day I'll make the attempt when I try to build my first custom module. Again, I appreciate the response.

Stomper’s picture

Is there a quick way to link taxonomy terms with Location data? I have a large taxonomy that will continue to grow, linking one term to one location data manually would be very tedious.

I am trying to link a campus to a city/state.

Digital Storm’s picture

I'm looking for exactly what you're after gman and have searched throughout drupal.org for a way to achieve it. No luck so far. As a non-coder all I can do now is wish that somebody does develop a module. I would be willing to assist you in any way I can though. I really find it hard to believe that so few people seem to see the need for such a module in that many sites with geographically diverse content would surely want to harness the power of both the locative information and taxonomy. Good luck and let me know if you could use any help from a newbie.

Ela’s picture

subscribing.. could use this as well

Stomper’s picture

Is it possible to import location information for each term via taxonomy csv? It seems very tedious to manually add locative information each term after they've been added.

goron’s picture

For those that are interested in the use case described in #17 and #18, there is an issue discussing this - #1094320: Other way around taxonomy/location integration

rooby’s picture

@Stomper:
Importing using taxonomy csv would be the domain of the taxonomy csv module.
For reference for other your issue for that module is here - #1131268: Import taxonomy Location information via CSV.
As a reference point, the node_import module allows importing locations on nodes.
The approach for taxonomy would be similar to what they have I imagine (although that module is fairly complex - at least from the UI perspective, I haven't looked at the code).

Aside from that you might have to either do it manually or else write a custom import script.

legolasbo’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing old D6 issues as D6 is end of life