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 :)

CommentFileSizeAuthor
#1 get_marker.patch496 bytesnemchenk

Comments

nemchenk’s picture

StatusFileSize
new496 bytes

In fact, attached is my stab at it in patch form, against 6.x-1.x-dev 2010-Apr-09

nemchenk’s picture

Bump? This is now in 6.x-dev of NAT-ng: http://drupal.org/node/776424

johnv’s picture

Status: Active » Closed (won't fix)

Closing this very old issue. Please reopen if it is still valid.