google.load('visualization', '1', {'packages': ['geomap']}); google.setOnLoadCallback(drawMap); function drawMap() { var data = new google.visualization.DataTable(); data.addColumn('string','State','Estado'); data.addColumn('number','Negocios Listados',''); data.addRows(32); data.setValue(0, 0, 'Aguascalientes' ); data.setValue(0, 1, 66 ); data.setValue(1, 0, 'Baja California' ); data.setValue(1, 1, 164 ); data.setValue(2, 0, 'Baja California Sur' ); data.setValue(2, 1, 146 ); data.setValue(3, 0, 'Campeche' ); data.setValue(3, 1, 41 ); data.setValue(4, 0, 'Chiapas' ); data.setValue(4, 1, 135 ); data.setValue(5, 0, 'Chihuahua' ); data.setValue(5, 1, 127 ); data.setValue(6, 0, 'Coahuila' ); data.setValue(6, 1, 96 ); data.setValue(7, 0, 'Colima' ); data.setValue(7, 1, 43 ); data.setValue(8, 0, 'Distrito Federal' ); data.setValue(8, 1, 326 ); data.setValue(9, 0, 'Durango' ); data.setValue(9, 1, 32 ); data.setValue(10, 0, 'Estado de México' ); data.setValue(10, 1, 96 ); data.setValue(11, 0, 'Guanajuato' ); data.setValue(11, 1, 126 ); data.setValue(12, 0, 'Guerrero' ); data.setValue(12, 1, 189 ); data.setValue(13, 0, 'Hidalgo' ); data.setValue(13, 1, 31 ); data.setValue(14, 0, 'Jalisco' ); data.setValue(14, 1, 261 ); data.setValue(15, 0, 'Michoacán' ); data.setValue(15, 1, 70 ); data.setValue(16, 0, 'Morelos' ); data.setValue(16, 1, 74 ); data.setValue(17, 0, 'Nayarit' ); data.setValue(17, 1, 29 ); data.setValue(18, 0, 'Nuevo León' ); data.setValue(18, 1, 114 ); data.setValue(19, 0, 'Oaxaca' ); data.setValue(19, 1, 53 ); data.setValue(20, 0, 'Puebla' ); data.setValue(20, 1, 91 ); data.setValue(21, 0, 'Querétaro' ); data.setValue(21, 1, 53 ); data.setValue(22, 0, 'Quintana Roo' ); data.setValue(22, 1, 204 ); data.setValue(23, 0, 'San Luis Potosí' ); data.setValue(23, 1, 44 ); data.setValue(24, 0, 'Sinaloa' ); data.setValue(24, 1, 90 ); data.setValue(25, 0, 'Sonora' ); data.setValue(25, 1, 175 ); data.setValue(26, 0, 'Tabasco' ); data.setValue(26, 1, 38 ); data.setValue(27, 0, 'Tamaulipas' ); data.setValue(27, 1, 110 ); data.setValue(28, 0, 'Tlaxcala' ); data.setValue(28, 1, 7 ); data.setValue(29, 0, 'Veracruz' ); data.setValue(29, 1, 133 ); data.setValue(30, 0, 'Yucatán' ); data.setValue(30, 1, 52 ); data.setValue(31, 0, 'Zacatecas' ); data.setValue(31, 1, 29 ); var options = {}; options['region'] = 'MX'; options['dataMode'] = 'regions'; options['width'] = '300'; options['height'] = '230'; options['colors'] = [0x00FFFF, 0x00CCCC, 0x0099CC, 0x0066FF, 0x006699]; //options['showLegend'] = false; var container = document.getElementById('map'); var geomap = new google.visualization.GeoMap(container); geomap.draw(data, options); google.visualization.events.addListener( geomap, 'regionClick', function(e) { switch (e['region']){ case 'MX-AGU': document.location.href='/Aguascalientes-27.html'; break; case 'MX-BCN': document.location.href='/Baja-California-3.html'; break; case 'MX-BCS': document.location.href='/Baja-California-Sur-4.html'; break; case 'MX-CAM': document.location.href='/Campeche-28.html'; break; case 'MX-CHP': document.location.href='/Chiapas-25.html'; break; case 'MX-CHH': document.location.href='/Chihuahua-5.html'; break; case 'MX-COA': document.location.href='/Coahuila-6.html'; break; case 'MX-COL': document.location.href='/Colima-18.html'; break; case 'MX-DIF': document.location.href='/Distrito-Federal-24.html'; break; case 'MX-DUR': document.location.href='/Durango-10.html'; break; case 'MX-MEX': document.location.href='/Estado-de-Mexico-23.html'; break; case 'MX-GUA': document.location.href='/Guanajuato-14.html'; break; case 'MX-GRO': document.location.href='/Guerrero-26.html'; break; case 'MX-HID': document.location.href='/Hidalgo-11.html'; break; case 'MX-JAL': document.location.href='/Jalisco-13.html'; break; case 'MX-MIC': document.location.href='/Michoacan-15.html'; break; case 'MX-MOR': document.location.href='/Morelos-19.html'; break; case 'MX-NAY': document.location.href='/Nayarit-9.html'; break; case 'MX-NLE': document.location.href='/Nuevo-Leon-7.html'; break; case 'MX-OAX': document.location.href='/Oaxaca-21.html'; break; case 'MX-PUE': document.location.href='/Puebla-22.html'; break; case 'MX-QUE': document.location.href='/Queretaro-20.html'; break; case 'MX-ROO': document.location.href='/Quintana-Roo-30.html'; break; case 'MX-SLP': document.location.href='/San-Luis-Potosi-12.html'; break; case 'MX-SIN': document.location.href='/Sinaloa-2.html'; break; case 'MX-SON': document.location.href='/Sonora-1.html'; break; case 'MX-TAB': document.location.href='/Tabasco-29.html'; break; case 'MX-TAM': document.location.href='/Tamaulipas-8.html'; break; case 'MX-TLA': document.location.href='/Tlaxcala-17.html'; break; case 'MX-VER': document.location.href='/Veracruz-31.html'; break; case 'MX-YUC': document.location.href='/Yucatan-32.html'; break; case 'MX-ZAC': document.location.href='/Zacatecas-16.html'; break; } }); };