Hi Chao -
Sorry for the slow response.
The items are all in tm.datasets, each member of which is a TimeMapDataset object with an items array. Each item can have one or more placemarks - one is the default, but you can have more.
Instead of tags, you could load the items like this (this is assuming data in JSON):
items: [
{ title: "My Point", point: { lat: ... , lon: ... }, options: { id: 'my_item'}},
{ title: "Line to My Point", polyline: [...], options: { pointId: 'my_item' } },
...
]
Now maintain an array or other data structure with all of the points whose lines should be shown:
var showLines = ['my_item', ...];
and add a filter that checks this list:
var showLine = function(item) {
// if you have a pointId, show the item only if its point is supposed to be visible
return showLines.indexOf(item.opts.pointId) >= 0 || !item.opts.pointId;
}
tm.addFilter("map", showLine);
now when you call tm.filter('map'), it will show/hide the lines as desired.
-Nick