Code to create Interactive GoogleMaps of CrisisCamp Locations

From CrisisCommons
Jump to: navigation, search

Code Source

http://code.google.com/apis/visualization/documentation/gallery/map.html

Data

Coordinates lat, lon from itouchmap.com or addressfix.com

Austin Texas 30.272921, -97.744386
Bogota, Colombia 4.609866, -74.08205
Boston 42.363585, -71.082461
Boulder/Denver, Colorado 39.982519, -105.247745
Brooklyn 40.703952, -73.986697
Buenos Aires, Argentina -34.60891, -58.378257
Calgary 51.055149, -114.062438
Cambridge, England 52.200733,0.133225
Chicago 41.879211, -87.637199
Chile -33.42536, -70.566466
Christchurch, New Zealand -43.531637,172.636645
Iceland 64.135338, -21.89521
London 51.5248, -0.122631
Los Angeles 34.021702, -118.287445
Miami 25.788404, -80.185936
Montreal 45.529387, -73.608497
New Orleans 29.947093, -90.069164
New York City 40.728299, -74.004807
Northern California 37.416989, -122.025714
Paris 48.870572,2.342212
Philadelphia 39.952775, -75.159662
Phoenix 33.449383, -112.069967
Pittsburgh 40.472064, -79.913673
Portland, Oregon 45.524097, -122.675468
Rochester 43.090448, -77.675186
Salem, Oregon 44.937023, -123.031683
Santa Barbara 34.419274, -119.847847
Seattle 47.484733, -122.177453
Silicon Valley 37.387115, -122.063711
Singapore 1.292522, 103.775783
Toronto, Ontario 43.659844, -79.396823
Washington DC 38.902194, -77.020952

html code for the camp visualisations

 <html>
 <head>
   <script type="text/javascript" src="http://www.google.com/jsapi"></script>
   <script type="text/javascript">
     google.load("visualization", "1", {packages:["map"]});
     google.setOnLoadCallback(drawMap);
     function drawMap() {
       var data = new google.visualization.DataTable();
       data.addColumn('number', 'Lat');
       data.addColumn('number', 'Lon');
       data.addColumn('string', 'Name');
       data.addRows(30);
       data.setCell(0, 0, 30.272921);
       data.setCell(0, 1, -97.744386);
       data.setCell(0, 2, '<a href="http://wiki.crisiscommons.org/wiki/Austin">Austin</a>, Texas');
       data.setCell(1, 0, 4.609866);
       data.setCell(1, 1,  -74.08205);
       data.setCell(1, 2, '<a href="http://wiki.crisiscommons.org/wiki/Bogota">Bogota</a>, Columbia');
       data.setCell(2, 0,  42.363585);
       data.setCell(2, 1,  -71.082461);
       data.setCell(2, 2, '<a href="http://wiki.crisiscommons.org/wiki/Boston">Boston</a>');
       data.setCell(3, 0, 39.982519);
       data.setCell(3, 1, -105.247745);
       data.setCell(3, 2, '<a href="http://wiki.crisiscommons.org/wiki/Colorado">Boulder/Denver, Colorado</a>');
       data.setCell(4, 0, 40.703952);
       data.setCell(4, 1,  -73.986697);
       data.setCell(4, 2, '<a href="http://wiki.crisiscommons.org/wiki/CrisisCamp-Brooklyn">Brooklyn</a>');
       data.setCell(5, 0, -34.60891);
       data.setCell(5, 1,  -58.378257);
       data.setCell(5, 2, '<a href="http://wiki.crisiscommons.org/wiki/Argentina">Argentina</a>');
       data.setCell(6, 0, 51.055149);
       data.setCell(6, 1, -114.062438);
       data.setCell(6, 2, '<a href="http://wiki.crisiscommons.org/wiki/Calgary">Calgary</a>');
       data.setCell(7, 0, 41.879211);
       data.setCell(7, 1,  -87.637199);
       data.setCell(7, 2, '<a href="http://wiki.crisiscommons.org/wiki/CrisisCampChicago">Chicago</a>');
       data.setCell(8, 0, -33.42536);
       data.setCell(8, 1, -70.566466);
       data.setCell(8, 2, '<a href="http://wiki.crisiscommons.org/wiki/Chile">Chile</a>');
       data.setCell(9, 0, -43.531637);
       data.setCell(9, 1, 172.636645);
       data.setCell(9, 2, '<a href="http://wiki.crisiscommons.org/wiki/New_Zealand">Christchurch</a>, New Zealand');
       data.setCell(10, 0, 64.135338);
       data.setCell(10, 1,  -21.89521);
       data.setCell(10, 2, '<a href="http://wiki.crisiscommons.org/wiki/Iceland">Iceland</a>');
       data.setCell(11, 0, 51.5248);
       data.setCell(11, 1,  -0.122631);
       data.setCell(11, 2, '<a href="http://wiki.crisiscommons.org/wiki/Crisis_Camp_London">London</a>, UK');
       data.setCell(12, 0, 34.021702);
       data.setCell(12, 1, -118.287445);
       data.setCell(12, 2, '<a href="http://wiki.crisiscommons.org/wiki/Los_Angeles">Los Angeles</a>');
       data.setCell(13, 0, 25.788404);
       data.setCell(13, 1,  -80.185936);
       data.setCell(13, 2, '<a href="http://wiki.crisiscommons.org/wiki/Miami">Miami</a>');
       data.setCell(14, 0,  45.529387);
       data.setCell(14, 1,  -73.608497);
       data.setCell(14, 2, '<a href="http://wiki.crisiscommons.org/wiki/Montreal">Montreal</a>');
       data.setCell(15, 0, 29.947093);
       data.setCell(15, 1,  -90.069164);
       data.setCell(15, 2, '<a href="http://wiki.crisiscommons.org/wiki/New_Orleans">New Orleans</a>');
       data.setCell(16, 0, 40.728299);
       data.setCell(16, 1,  -74.004807);
       data.setCell(16, 2, '<a href="http://wiki.crisiscommons.org/wiki/New_York_City">New York City</a>');
       data.setCell(17, 0, 37.416989);
       data.setCell(17, 1,  -122.025714);
       data.setCell(17, 2, '<a href="http://wiki.crisiscommons.org/wiki/Northern_California">Northern California</a>');
       data.setCell(18, 0, 48.870572);
       data.setCell(18, 1, 2.342212);
       data.setCell(18, 2, '<a href="http://wiki.crisiscommons.org/wiki/Paris">Paris</a>');
       data.setCell(19, 0, 39.952775);
       data.setCell(19, 1,  -75.159662);
       data.setCell(19, 2, '<a href="http://wiki.crisiscommons.org/wiki/Philadelphia">Philadelphia</a>');
       data.setCell(20, 0, 33.449383);
       data.setCell(20, 1, -112.069967);
       data.setCell(20, 2, '<a href="http://wiki.crisiscommons.org/wiki/Phoenix">Phoenix</a>');
       data.setCell(21, 0, 40.472064);
       data.setCell(21, 1,  -79.913673);
       data.setCell(21, 2, '<a href="http://wiki.crisiscommons.org/wiki/Pittsburgh">Pittsburgh</a>');
       data.setCell(22, 0, 45.524097);
       data.setCell(22, 1,  -122.675468);
       data.setCell(22, 2, '<a href="http://wiki.crisiscommons.org/wiki/Portland">Portland</a>, Oregon');
       data.setCell(23, 0, 43.090448);
       data.setCell(23, 1,  -77.675186);
       data.setCell(23, 2, '<a href="http://wiki.crisiscommons.org/wiki/Rochester">Rochester</a>');
       data.setCell(24, 0, 44.937023);
       data.setCell(24, 1,  -123.031683);
       data.setCell(24, 2, '<a href="http://wiki.crisiscommons.org/wiki/Salem">Salem</a>, Oregon');
       data.setCell(25, 0, 34.419274);
       data.setCell(25, 1,  -119.847847);
       data.setCell(25, 2, '<a href="http://wiki.crisiscommons.org/wiki/Santa_Barbera">Santa Barbera</a>');
       data.setCell(26, 0,  47.484733);
       data.setCell(26, 1,  -122.177453);
       data.setCell(26, 2, '<a href="http://wiki.crisiscommons.org/wiki/Seattle">Seattle</a>');
       data.setCell(27, 0,  37.387115);
       data.setCell(27, 1, -122.063711);
       data.setCell(27, 2, '<a href="http://wiki.crisiscommons.org/wiki/CrisisCampSV">Silicon Valley</a>');
       data.setCell(28, 0, 43.659844);
       data.setCell(28, 1, -79.396823);
       data.setCell(28, 2, '<a href="http://wiki.crisiscommons.org/wiki/Toronto">Toronto, Ontario</a>');
       data.setCell(29, 0, 38.902194);
       data.setCell(29, 1, -77.020952);
       data.setCell(29, 2, '<a href="http://wiki.crisiscommons.org/wiki/Washington,_DC">Washington DC</a>');
       data.setCell(30, 0, 52.200733);
       data.setCell(30, 1, 0.133225);
       data.setCell(30, 2, '<a href="http://wiki.crisiscommons.org/wiki/Cambridge">Cambridge, England</a>');
       data.setCell(31, 0, 1.292522);
       data.setCell(31, 1, 103.775783);
       data.setCell(31, 2, '<a href="http://www.socinfo.com/relief20/entrepreneurship/workshop/singapore">Singapore</a>');
       var map = new google.visualization.Map(document.getElementById('map_div'));
       map.draw(data, {showTip: true});
     }
   </script>
 </head>
 <body>
 </body>
 </html>