<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-14172001</id><updated>2011-04-21T15:01:41.467-07:00</updated><title type='text'>Google Map</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://googlemap.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14172001/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://googlemap.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>adelaideindex</name><uri>http://www.blogger.com/profile/07919818581181866495</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-14172001.post-112044710741514378</id><published>2005-07-03T20:17:00.000-07:00</published><updated>2005-07-04T00:35:48.406-07:00</updated><title type='text'>Adding a google map to blogger</title><content type='html'>&lt;ol&gt;&lt;li&gt;You need to get a Google Maps API key for your blog.&lt;br /&gt;go to &lt;a href="http://maps.google.com/apis/maps/signup.html"&gt;http://maps.google.com/apis/maps/signup.html&lt;/a&gt;, and enter the url of your blog to get the key. eg for this blog i entered &lt;a href="http://googlemap.blogspot.com/"&gt;http://googlemap.blogspot.com/&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;You need to edit the template for your blog. (Warning: editing your template can lead to breaking your blog, it might be good to copy and paste your template into something like notepad before changing it).&lt;br /&gt;Just under the &amp;lt;head&amp;gt; tag, which should be near the top, add the line&lt;br /&gt;&lt;br /&gt;&lt;pre style="height: 80px;"&gt;&lt;br /&gt;&amp;lt;script src="http://maps.google.com/maps?file=api&amp;v=1&amp;key=xxxx" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and replace xxxx with the key you received.&lt;br /&gt;&lt;br /&gt;Now you have to decide where in your page to put the map. For this blog, i've put it just above where blogger inserts the blog posts. ie i put it just above the &amp;lt;Blogger&amp;gt; tag in the template.  Just above that tag, insert the code:&lt;br /&gt;&lt;br /&gt;&lt;pre style="height: 80px;"&gt;&lt;br /&gt;&amp;lt;div id="map" style="width: 100%; height: 300px"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Finally, add the following code just above the &amp;lt;/body&amp;gt; tag in the template (should be near the bottom)&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    &amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;    //&amp;lt;![CDATA[&lt;br /&gt;&lt;br /&gt;    function createMarker(x, y, title, thumbnail, image) {&lt;br /&gt;      var point = new GPoint(x, y);&lt;br /&gt;      var marker = new GMarker(point);&lt;br /&gt;      var html = '&amp;lt;center&amp;gt;' + title + '&amp;lt;br /&amp;gt;&amp;lt;a href="' + image + '" target="_blank"&amp;gt;&amp;lt;img src="' + thumbnail + '" /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/center&amp;gt;';&lt;br /&gt;&lt;br /&gt;      GEvent.addListener(marker, "click", function() {&lt;br /&gt;        marker.openInfoWindowHtml(html);&lt;br /&gt;      });&lt;br /&gt;&lt;br /&gt;      map.addOverlay(marker);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    var map = new GMap(document.getElementById("map"));&lt;br /&gt;    map.addControl(new GLargeMapControl());&lt;br /&gt;    mapTypes = map.getMapTypes();&lt;br /&gt;    map.setMapType(mapTypes[1]);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    //  ** change this line to set the location of the map and the zoom level. ** //&lt;br /&gt;    map.centerAndZoom(new GPoint(138.599310, -34.918413), 4);    &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;    // ** add createMarker function calls to create markers. ** //&lt;br /&gt;    createMarker(138.60215306282, -34.920666217804, 'The Adelaide City Council Library', 'http://www.adelaideindex.com/mapImages/t1.jpg', 'http://www.adelaideindex.com/mapImages/1.jpg');&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    //]]&amp;gt;&lt;br /&gt;    &amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;To change the location the map initially displays, edit the line:&lt;br/&gt;&lt;br /&gt;&lt;pre style="height: 80px;"&gt;&lt;br /&gt;    map.centerAndZoom(new GPoint(138.599310, -34.918413), 4);   &lt;br/&gt;&lt;br/&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;To add markers to the map, add lines such as:&lt;br/&gt;&lt;br /&gt;&lt;pre style="height: 80px;"&gt;&lt;br /&gt;    createMarker(latitude, longitude, 'title', 'thumbnail url', 'image url');&lt;br/&gt;&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br /&gt;an example is:&lt;/br&gt;&lt;br /&gt;&lt;pre style="height: 80px;"&gt;&lt;br /&gt;    createMarker(138.60215306282, -34.920666217804, 'The Adelaide City Council Library', 'http://www.adelaideindex.com/mapImages/t1.jpg', 'http://www.adelaideindex.com/mapImages/1.jpg');&lt;br/&gt;&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14172001-112044710741514378?l=googlemap.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://googlemap.blogspot.com/feeds/112044710741514378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14172001&amp;postID=112044710741514378' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14172001/posts/default/112044710741514378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14172001/posts/default/112044710741514378'/><link rel='alternate' type='text/html' href='http://googlemap.blogspot.com/2005/07/adding-google-map-to-blogger.html' title='Adding a google map to blogger'/><author><name>adelaideindex</name><uri>http://www.blogger.com/profile/07919818581181866495</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry></feed>
