I've hacked an interaction between Gmap Taxonomy and NAT NG for my site, but I would like to do this properly, which requires some way of getting the Gmap marker assigned to a term from Gmap Taxonomy (my current hack just looks in the DB table, but obviously that's no way to do it!)
So, what I would like to request is a function which would take a tid and return the marker associated with it. Something like this:
/**
* Return the marker used for a term
*/
function gmap_get_marker($tid) {
$result = db_query('SELECT marker, tid FROM {gmap_taxonomy_term} WHERE tid = %d', $term->tid);
if ($m = db_fetch_object($result)) {
return $m->marker;
} else {
return false;
}
}
My question is -- where is the best place to put this?
PS. I don't think there is a function in Gmap Taxonomy that does this already, but if there is I would appreciate a heads-up to it :)
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | get_marker.patch | 496 bytes | nemchenk |
Comments
Comment #1
nemchenk commentedIn fact, attached is my stab at it in patch form, against 6.x-1.x-dev 2010-Apr-09
Comment #2
nemchenk commentedBump? This is now in 6.x-dev of NAT-ng: http://drupal.org/node/776424
Comment #3
johnvClosing this very old issue. Please reopen if it is still valid.