Quick question. I just read http://drupal.org/node/205944 and http://drupal.org/node/173776 about gmap taxonomy markers, and noted that it was put in the new version. Thanks! But, they can only be assigned to term, which makes it a little tricky with free tagging.

Say I have 3 main terms with many subterms: Plants [tag-types], Animals[tag-types], and birds [tag-types], entered in through free tagging. Let's say I want to just have taxonomy based markers based on the main categories (plants, animals, birds), and have all the subtags have the same marker for each respective category?

How would one suggest I go about doing this?

Thanks.

Comments

rc2020’s picture

Hey...is there any chance someone has had a chance to look at this yet? If module maintainers think its a good idea, has it been committed to one of the next releases?

Thanks.

bdragon’s picture

Category: support » feature

I'll need to think about it..

There's a lot of ways to approach it, I would like to keep the complexity of gmap_taxonomy down as much as possible though..

rc2020’s picture

Thanks Bdragon,

Im just throwing it out there as a possibility, I think it would work out pretty nice...

mgenovese’s picture

Seeing the last entry was 42 weeks ago, I'd like to suggest an implementation that I think is intuitive for parent terms:

1. Every vocabulary can have a default marker assigned.

2. For each vocabulary, have an enable/disable option for using parent markers if the term doesn't have a marker.

a. Parent-marker option = disabled: If the node has one term selected from a vocabulary, and it doesn't have a marker selected for it, use the default marker for that vocabulary.

b. Parent-marker option = enabled: If the node has one term selected from a vocabulary, check the term for a marker; if no marker assigned, go to the immediate parent - if no marker, go to the next parent up - if no marker, go up, etc. In other words, only use the default marker if the child + all parent terms don't have a marker assigned - else, use the marker of the closest parent.

3. If a node has multiple terms from the same vocabulary, use the term weighting info to select the marker for display on the map. This also works for 2b above, as the weighted marker will be traversed up the parent chain until a marker is found.

a. Decision: If a node has multiple terms from a single vocabulary, and with parent-markers enabled, but no markers are found with the lowest-weighted term, should the marker of the next lowest-weight term be checked, or should the default marker be used? Probably an unlikely scenario (if the vocab is designed right), but I would think the other term(s) should be traversed....but that's definitely a performance penalty. Using the default marker would be a higher-performance choice.

Thus, here's the priority for selecting a marker (highest priority -> lowest priority):

** Parent-marker mode disabled: Lowest-weighted term -> Next lowest-weight term -> Default marker for vocabulary -> Default Gmap marker.

** Parent-marker mode enabled: Lowest-weighted term -> Parent term(s) -> Next lowest-weight term (or parent term(s)?) -> Default marker for vocabulary -> Default Gmap marker.

In the case of multiple vocabularies, this is done for the lowest-weight vocabulary of a node. The caveat is that if no marker is found for a vocabulary (except the default marker for that vocab), should the next vocabulary be checked in a similar fashion? That's an implementation choice. I'd say no because of the performance penalty...unless all this is cached.

Personally, I'm all for these "smarts" being implemented under the hood of Gmap_Taxonomy. This would allow other modules to just query Gmap_Taxonomy with a set of nodes, and GT takes care of traversing the vocab trees and such, returning the selected marker for each node.

Comments?

podarok’s picture

Status: Active » Closed (won't fix)

release unsupported
feel free to open issue against latest 7.x dev