{"id":583,"date":"2009-04-27T13:03:55","date_gmt":"2009-04-27T03:03:55","guid":{"rendered":"https:\/\/eisabainyo.net\/weblog\/?p=583"},"modified":"2010-02-26T13:40:20","modified_gmt":"2010-02-26T03:40:20","slug":"code-to-embed-google-map-and-street-view","status":"publish","type":"post","link":"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/","title":{"rendered":"Code to embed Google Map and Street View"},"content":{"rendered":"<p>You will need to <a href=\"http:\/\/code.google.com\/apis\/maps\/signup.html\">sign up<\/a> for the Google Maps API key and replace \"INSERT_API_KEY_HERE\" with your API key.<\/p>\n<pre>\r\n&lt;!DOCTYPE html PUBLIC &quot;-\/\/W3C\/\/DTD XHTML 1.0 Strict\/\/EN&quot; &quot;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-strict.dtd&quot;&gt;\r\n&lt;html xmlns=&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html; charset=iso-8859-1&quot; \/&gt;\r\n&lt;title&gt;Google Map and Street View&lt;\/title&gt;\r\n\r\n&lt;script src=&quot;http:\/\/maps.google.com\/maps?file=api&amp;v=2&amp;key=INSERT_API_KEY_HERE&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;\r\n\r\n&lt;script type=&quot;text\/javascript&quot;&gt;\r\n    \/\/&lt;![CDATA[\r\n\r\n    function load() {\r\n      if (GBrowserIsCompatible()) {\r\n\t\tvar lat = -33.867141;\r\n\t\tvar lng = 151.207114;\r\n\t  \r\n        var map = new GMap2(document.getElementById(&quot;map&quot;));\r\n\t\tmap.addControl(new GSmallMapControl());\r\n\t\tmap.addControl(new GMapTypeControl());\r\n\t\tmap.setCenter(new GLatLng(lat,lng), 15);\r\n\t\t\r\n\t\tvar infoTabs = [\r\n  \t\tnew GInfoWindowTab(&quot;Address&quot;, &quot;Sydney&lt;br \/&gt; NSW, Australia&quot;),\r\n\t\t];\r\n\r\n\t\t\/\/ Place a marker in the center of the map and open the info window\r\n\t\tvar marker = new GMarker(map.getCenter());\r\n\t\tGEvent.addListener(marker, &quot;click&quot;, function() {\r\n  \t\tmarker.openInfoWindowTabsHtml(infoTabs);\r\n\t\t});\r\n\t\tmap.addOverlay(marker);\r\n\t\tmarker.openInfoWindowTabsHtml(infoTabs);\r\n\r\n\t\tvar point = new GLatLng(lat,lng);\r\n\t\tpanoramaOptions = { latlng:point };\r\n\t\tpano = new GStreetviewPanorama(document.getElementById(&quot;streetview&quot;), panoramaOptions);\r\n\t\tGEvent.addListener(pano);\r\n\r\n\t}\r\n    }\r\n\r\n\t\r\n    \/\/]]&gt;\r\n&lt;\/script&gt;\t\r\n\t\r\n&lt;\/head&gt;\r\n&lt;body onload=&quot;load()&quot; onunload=&quot;GUnload()&quot;&gt;\r\n\r\n&lt;h3&gt;Google Map&lt;\/h3&gt;\r\n&lt;div id=&quot;map&quot; style=&quot;width: 500px; height: 400px&quot;&gt;&lt;\/div&gt;\r\n&lt;h3&gt;Street View&lt;\/h3&gt;\r\n&lt;div id=&quot;streetview&quot; style=&quot;width: 500px; height: 400px&quot;&gt;&lt;\/div&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\r\n<\/pre>\n<h3>Books on Google Maps<\/h3>\n<div class=\"book\">\n<a href=\"http:\/\/www.amazon.com\/gp\/product\/0596101619?ie=UTF8&tag=eisabainyonet-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0596101619\"><img loading=\"lazy\" decoding=\"async\" width=\"80\" height=\"120\" src=\"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2009\/04\/google-maps-hacks.jpg\" alt=\"\" title=\"Google Maps Hacks\" class=\"alignnone size-full wp-image-1096\" \/><span>Google Maps Hacks: Tips & Tools for Geographic Searching and Remixing<\/span><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.assoc-amazon.com\/e\/ir?t=eisabainyonet-20&l=as2&o=1&a=0596101619\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/>\n<\/div>\n<div class=\"book\">\n<a href=\"http:\/\/www.amazon.com\/gp\/product\/1590597079?ie=UTF8&tag=eisabainyonet-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=1590597079\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2009\/04\/google-maps-apps.jpg\" alt=\"\" title=\" Beginning Google Maps Applications with PHP and Ajax\" width=\"91\" height=\"120\" class=\"alignnone size-full wp-image-1097\" \/><span>Beginning Google Maps Applications with PHP and Ajax: From Novice to Professional<\/span><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.assoc-amazon.com\/e\/ir?t=eisabainyonet-20&l=as2&o=1&a=1590597079\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>You will need to sign up for the Google Maps API key and replace &#8220;INSERT_API_KEY_HERE&#8221;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,8,11],"tags":[],"class_list":["post-583","post","type-post","status-publish","format-standard","hentry","category-google","category-snippets","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Code to embed Google Map and Street View | Tech Leadership Advice &amp; Resources<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Code to embed Google Map and Street View | Tech Leadership Advice &amp; Resources\" \/>\n<meta property=\"og:description\" content=\"You will need to sign up for the Google Maps API key and replace &quot;INSERT_API_KEY_HERE&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/\" \/>\n<meta property=\"og:site_name\" content=\"Tech Leadership Advice &amp; Resources\" \/>\n<meta property=\"article:published_time\" content=\"2009-04-27T03:03:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2010-02-26T03:40:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2009\/04\/google-maps-hacks.jpg\" \/>\n<meta name=\"author\" content=\"Isabel Nyo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Isabel Nyo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/\"},\"author\":{\"name\":\"Isabel Nyo\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab\"},\"headline\":\"Code to embed Google Map and Street View\",\"datePublished\":\"2009-04-27T03:03:55+00:00\",\"dateModified\":\"2010-02-26T03:40:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/\"},\"wordCount\":56,\"commentCount\":22,\"publisher\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab\"},\"image\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2009\/04\/google-maps-hacks.jpg\",\"articleSection\":[\"Google\",\"Snippets\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/\",\"url\":\"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/\",\"name\":\"Code to embed Google Map and Street View | Tech Leadership Advice &amp; Resources\",\"isPartOf\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2009\/04\/google-maps-hacks.jpg\",\"datePublished\":\"2009-04-27T03:03:55+00:00\",\"dateModified\":\"2010-02-26T03:40:20+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/#primaryimage\",\"url\":\"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2009\/04\/google-maps-hacks.jpg\",\"contentUrl\":\"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2009\/04\/google-maps-hacks.jpg\",\"width\":\"80\",\"height\":\"120\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eisabainyo.net\/weblog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Code to embed Google Map and Street View\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#website\",\"url\":\"https:\/\/eisabainyo.net\/weblog\/\",\"name\":\"Career Resources for Professionals in Tech\",\"description\":\"Books, worksheets, templates, frameworks and other useful resources for Chief Technology Officers (CTOs), VPs of Engineering &amp; Technology Directors\",\"publisher\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/eisabainyo.net\/weblog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab\",\"name\":\"Isabel Nyo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3d4b1a4e0f425adb39b242b0d62c5fac07c82f8314a24631f1d16f47bdf006d8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3d4b1a4e0f425adb39b242b0d62c5fac07c82f8314a24631f1d16f47bdf006d8?s=96&d=mm&r=g\",\"caption\":\"Isabel Nyo\"},\"logo\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/image\/\"},\"description\":\"My interests: Web Development, Web Design, Web Applications, Web 2.0, AJAX, Search Engine Optimisation, Latest Technologies and more..\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Code to embed Google Map and Street View | Tech Leadership Advice &amp; Resources","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/","og_locale":"en_US","og_type":"article","og_title":"Code to embed Google Map and Street View | Tech Leadership Advice &amp; Resources","og_description":"You will need to sign up for the Google Maps API key and replace \"INSERT_API_KEY_HERE\"","og_url":"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/","og_site_name":"Tech Leadership Advice &amp; Resources","article_published_time":"2009-04-27T03:03:55+00:00","article_modified_time":"2010-02-26T03:40:20+00:00","og_image":[{"url":"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2009\/04\/google-maps-hacks.jpg","type":"","width":"","height":""}],"author":"Isabel Nyo","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Isabel Nyo","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/#article","isPartOf":{"@id":"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/"},"author":{"name":"Isabel Nyo","@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab"},"headline":"Code to embed Google Map and Street View","datePublished":"2009-04-27T03:03:55+00:00","dateModified":"2010-02-26T03:40:20+00:00","mainEntityOfPage":{"@id":"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/"},"wordCount":56,"commentCount":22,"publisher":{"@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab"},"image":{"@id":"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/#primaryimage"},"thumbnailUrl":"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2009\/04\/google-maps-hacks.jpg","articleSection":["Google","Snippets","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/","url":"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/","name":"Code to embed Google Map and Street View | Tech Leadership Advice &amp; Resources","isPartOf":{"@id":"https:\/\/eisabainyo.net\/weblog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/#primaryimage"},"image":{"@id":"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/#primaryimage"},"thumbnailUrl":"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2009\/04\/google-maps-hacks.jpg","datePublished":"2009-04-27T03:03:55+00:00","dateModified":"2010-02-26T03:40:20+00:00","breadcrumb":{"@id":"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/#primaryimage","url":"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2009\/04\/google-maps-hacks.jpg","contentUrl":"https:\/\/eisabainyo.net\/weblog\/wp-content\/uploads\/2009\/04\/google-maps-hacks.jpg","width":"80","height":"120"},{"@type":"BreadcrumbList","@id":"https:\/\/eisabainyo.net\/weblog\/2009\/04\/27\/code-to-embed-google-map-and-street-view\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eisabainyo.net\/weblog\/"},{"@type":"ListItem","position":2,"name":"Code to embed Google Map and Street View"}]},{"@type":"WebSite","@id":"https:\/\/eisabainyo.net\/weblog\/#website","url":"https:\/\/eisabainyo.net\/weblog\/","name":"Career Resources for Professionals in Tech","description":"Books, worksheets, templates, frameworks and other useful resources for Chief Technology Officers (CTOs), VPs of Engineering &amp; Technology Directors","publisher":{"@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/eisabainyo.net\/weblog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab","name":"Isabel Nyo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3d4b1a4e0f425adb39b242b0d62c5fac07c82f8314a24631f1d16f47bdf006d8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3d4b1a4e0f425adb39b242b0d62c5fac07c82f8314a24631f1d16f47bdf006d8?s=96&d=mm&r=g","caption":"Isabel Nyo"},"logo":{"@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/image\/"},"description":"My interests: Web Development, Web Design, Web Applications, Web 2.0, AJAX, Search Engine Optimisation, Latest Technologies and more.."}]}},"_links":{"self":[{"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/posts\/583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/comments?post=583"}],"version-history":[{"count":4,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/posts\/583\/revisions"}],"predecessor-version":[{"id":1099,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/posts\/583\/revisions\/1099"}],"wp:attachment":[{"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/media?parent=583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/categories?post=583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/tags?post=583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}