I'm using geomap and is taking too much to load.
Can i do something to improve this ?
My code is below.



-------------------------------------------------------------------------------------------------------
google.load('visualization', '1', {'packages': ['geomap']});
google.setOnLoadCallback(drawMap);
function drawMap() {
var data = new google.visualization.DataTable();

data.addRows(33);

data.addColumn('string', 'City');
data.addColumn('number', 'Popularity');



data.setValue(0, 0, 'Albufeira');data.setValue(0, 1,
1);data.setValue(1, 0, 'Almada');data.setValue(1, 1,
4);data.setValue(2, 0, 'Alverca');data.setValue(2, 1,
2);data.setValue(3, 0, 'Amadora');data.setValue(3, 1,
5);data.setValue(4, 0, 'Braga');data.setValue(4, 1,
7);data.setValue(5, 0, 'Carvalhos');data.setValue(5, 1,
2);data.setValue(6, 0, 'Coimbra');data.setValue(6, 1,
3);data.setValue(7, 0, 'Covilha');data.setValue(7, 1,
1);data.setValue(8, 0, 'Espinho');data.setValue(8, 1,
1);data.setValue(9, 0, 'Evora');data.setValue(9, 1,
1);data.setValue(10, 0, 'Felgueiras');data.setValue(10, 1,
4);data.setValue(11, 0, 'Figueira Da Foz');data.setValue(11, 1,
2);data.setValue(12, 0, 'Funchal');data.setValue(12, 1,
2);data.setValue(13, 0, 'Leiria');data.setValue(13, 1,
1);data.setValue(14, 0, 'Linda-a-Velha');data.setValue(14, 1,
2);data.setValue(15, 0, 'Lisbon');data.setValue(15, 1,
63);data.setValue(16, 0, 'Maia');data.setValue(16, 1,
1);data.setValue(17, 0, 'Matosinhos');data.setValue(17, 1,
2);data.setValue(18, 0, 'Oeiras');data.setValue(18, 1,
1);data.setValue(19, 0, 'Ponta Delgada');data.setValue(19, 1,
3);data.setValue(20, 0, 'Porto');data.setValue(20, 1,
71);data.setValue(21, 0, 'Porto Salvo');data.setValue(21, 1,
1);data.setValue(22, 0, 'Sacavem');data.setValue(22, 1,
2);data.setValue(23, 0, 'Sangalhos');data.setValue(23, 1,
1);data.setValue(24, 0, 'Santarem');data.setValue(24, 1,
1);data.setValue(25, 0, 'Santo Tirso');data.setValue(25, 1,
5);data.setValue(26, 0, 'Sao Domingos de Rana');data.setValue(26, 1,
1);data.setValue(27, 0, 'Sao Joao Da Madeira');data.setValue(27, 1,
5);data.setValue(28, 0, 'Seixal');data.setValue(28, 1,
1);data.setValue(29, 0, 'Torres Vedras');data.setValue(29, 1,
1);data.setValue(30, 0, 'Vila Do Conde');data.setValue(30, 1,
1);data.setValue(31, 0, 'Vila Nova de Gaia');data.setValue(31, 1,
4);data.setValue(32, 0, 'Viseu');data.setValue(32, 1, 1);




var options = {};
options['region'] = 'PT';
options['colors'] = [0xFF8747, 0xFFB581, 0xc06000]; //orange colors
options['dataMode'] = 'markers';
options['height'] = '500';
options['width'] = '800';

var container = document.getElementById('mapDiv');
var geomap = new google.visualization.GeoMap(container);
geomap.draw(data, options);
};

------------------------------------------------------------------------------------------------------------

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to google-visualization-...@googlegroups.com.
To unsubscribe from this group, send email to 
google-visualization-api+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to