How to remove coordinates from tooltip of Googles Geo Charts
google-visualization
Solution
You can use this data structure, for example:
google.visualization.DataTable();
data.addColumn('number', 'Lat');
data.addColumn('number', 'Long');
data.addColumn('string','tooltip');
data.addColumn('number','Example');
data.addColumn({type:'string', role:'tooltip'});
data.addRows([[41.151636,-8.569336,'Portugal',0,'test PT']]);
data.addRows([[ 39.059575,-98.789062,'USA',1,'test US']]);
This way the coordinates wont show up, and you'll have 2 lines for the tooltip.
Check a working example:
http://jsfiddle.net/cmoreira/q9Jzz/
Problem
I've added some markers to my map (using Googles Chart API) ``` data.addColumn('number', 'Lat'); data.addColumn('number', 'Long'); data.addColumn('number', 'Value'); data.addColumn({type:'string', role:'tooltip'}); data.addRows([ [48.1667,14.0333, 15, 'Tooltiptext'], [48.2000,14.0333, 25, 'Tooltiptext'], [48.2000,14.2333, 35, 'Tooltiptext'] ]); ``` This is how it looks: I would like to get rid of the lat/long and replace it with `Tooltiptext: {value}`