<p>Given a list of locations such as</p>
<pre class="lang-html prettyprint-override"><code>    &lt;td&gt;El Cerrito, CA&lt;/td&gt;
    &lt;td&gt;Corvallis, OR&lt;/td&gt;
    &lt;td&gt;Morganton, NC&lt;/td&gt;
    &lt;td&gt;New York, NY&lt;/td&gt;
    &lt;td&gt;San Diego, CA&lt;/td&gt;
</code></pre>
<p>What's the easiest way to generate a Google Map with pushpins for each location?</p>

[{'answer_id': 15257, 'author': 'mk.', 'author_id': 1797, 'author_profile': 'https://Stackoverflow.com/users/1797', 'pm_score': 1, 'selected': False, 'text': '<p>I guess more information would be needed to really give you an answer, but over at Django Pluggables there is a <a href="http://djangoplugables.com/projects/django-googlemap/" rel="nofollow noreferrer">django-googlemap plugin</a> that might be of help.</p>\n\n<p><strong>Edit:</strong> Adam has a much better answer. When it doubt look at the API examples. </p>\n'}, {'answer_id': 15265, 'author': 'Adam Haile', 'author_id': 194, 'author_profile': 'https://Stackoverflow.com/users/194', 'pm_score': 3, 'selected': False, 'text': '<p>Check out the <a href="http://code.google.com/apis/maps/documentation/examples/" rel="noreferrer">Google Maps API Examples</a>\nThey make it pretty simple and their API documentation is great.\nMost of the examples are for doing all the code in JavaScript on the client side, but there are APIs for other languages available as well.</p>\n'}, {'answer_id': 15346, 'author': 'mauriciopastrana', 'author_id': 547, 'author_profile': 'https://Stackoverflow.com/users/547', 'pm_score': 1, 'selected': False, 'text': '<p>Try this: <a href="http://www.google.com/uds/solutions/wizards/mapsearch.html" rel="nofollow noreferrer">http://www.google.com/uds/solutions/wizards/mapsearch.html</a></p>\n\n<p>It\'s a google maps wizard which will generate the code for you. Not the best for your application; but a good place to "get your feet wet" ;)</p>\n\n<p>Edit: (found the link), <a href="http://econym.googlepages.com/index.htm" rel="nofollow noreferrer">here\'s a good Google Maps API stepwise tutorial.</a></p>\n\n<p>Good luck!</p>\n\n<p>/mp</p>\n'}, {'answer_id': 17132, 'author': 'Bernie Perez', 'author_id': 1992, 'author_profile': 'https://Stackoverflow.com/users/1992', 'pm_score': 5, 'selected': True, 'text': '<p>I\'m assuming you have the basics for Maps in your code already with your API Key.</p>\n\n<pre><code>&lt;head&gt;\n  &lt;script \n   type="text/javascript"\n   href="http://maps.google.com/maps?\n         file=api&amp;v=2&amp;key=xxxxx"&gt;\n  function createMap() {\n    var map = new GMap2(document.getElementById("map"));\n    map.setCenter(new GLatLng(37.44, -122.14), 14);\n  }\n  &lt;/script&gt;\n&lt;/head&gt;\n&lt;body onload="createMap()" onunload="GUnload()"&gt;\n</code></pre>\n\n<p>Everything in Google Maps is based off of latitude (lat) and longitude (lng).<br />\nSo to create a simple marker you will just create a GMarker with the lat and lng.</p>\n\n<pre><code>var where = new GLatLng(37.925243,-122.307358); //Lat and Lng for El Cerrito, CA\nvar marker = new GMarker(where); // Create marker (Pinhead thingy)\nmap.setCenter(where); // Center map on marker\nmap.addOverlay(marker); // Add marker to map\n</code></pre>\n\n<p>However if you don\'t want to look up the Lat and Lng for each city you can use Google\'s Geo Coder. Heres an example:</p>\n\n<pre><code>var address = "El Cerrito, CA";\nvar geocoder = new GClientGeocoder;\ngeocoder.getLatLng(address, function(point) {\n  if (point) {\n    map.clearOverlays(); // Clear all markers\n    map.addOverlay(new GMarker(point)); // Add marker to map\n    map.setCenter(point, 10); // Center and zoom map on marker\n  }\n});\n</code></pre>\n\n<p>So I would just create an array of GLatLng\'s of every city from the GeoCoder and then draw them on the map.</p>\n'}, {'answer_id': 17159, 'author': 'solrevdev', 'author_id': 2041, 'author_profile': 'https://Stackoverflow.com/users/2041', 'pm_score': 1, 'selected': False, 'text': '<p>Here are some links but as with most things i have not got round to trying them yet.</p>\n\n<p><a href="http://gathadams.com/2007/08/21/add-google-maps-to-your-net-site-in-10-minutes/" rel="nofollow noreferrer">http://gathadams.com/2007/08/21/add-google-maps-to-your-net-site-in-10-minutes/</a></p>\n\n<p><a href="http://www.mapbuilder.net/" rel="nofollow noreferrer">http://www.mapbuilder.net/</a></p>\n\n<p>Cheers\nJohn</p>\n'}]
['https://Stackoverflow.com/questions/15247', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/116/']