{"id":249,"date":"2022-08-30T14:58:12","date_gmt":"2022-08-30T14:58:12","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/08\/31\/google-maps-api-v3-marker-not-showing-due-to-undefined-variable-record-and-share-programming-errors\/"},"modified":"2022-08-30T14:58:12","modified_gmt":"2022-08-30T14:58:12","slug":"google-maps-api-v3-marker-not-showing-due-to-undefined-variable-record-and-share-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/google-maps-api-v3-marker-not-showing-due-to-undefined-variable-record-and-share-programming-errors\/","title":{"rendered":"Google Maps API V3 Marker not showing due to undefined variable-Record and share programming errors"},"content":{"rendered":"<p>I am having difficult getting my markers to show with the Google Maps V3 API.<\/p>\n<p>I get the below error when I load the page &#8211;<\/p>\n<p><b>TypeError: xml is undefined<\/b><\/p>\n<p><b>var markers = xml.documentElement.getElementsByTagName(&#8220;marker&#8221;);<\/b><\/p>\n<p>I&#8217;ve tried declaring the xml variable in a few different ways but to no avail.<\/p>\n<p>Any help greatly appreciated.<\/p>\n<pre><code>function load() {\n  map = new google.maps.Map(document.getElementById(\"map_canvas\"), {\n    center: new google.maps.LatLng(37.765558,-122.450867),\n    zoom: 11,\n    mapTypeId: 'roadmap'\n  });\n  var infoWindow = new google.maps.InfoWindow;\n\n  \/\/ Change this depending on the name of your PHP file\n  downloadUrl(\"phpsearch.php\", function(data) {\n    xml = data.responseXML;\n    var markers = xml.documentElement.getElementsByTagName(\"marker\");\/\/<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2013-08-31 06:21:05. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I am having difficult getting my markers to show with the Google Maps V3 API. I get the below error when I load the page &#8211; TypeError: xml is undefined var markers = xml.documentElement.getElementsByTagName(&#8220;marker&#8221;); I&#8217;ve tried declaring the xml variable in a few different ways but to no avail. Any help greatly appreciated. function load() [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-249","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=249"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/249\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}