{"id":1179,"date":"2022-08-30T15:13:42","date_gmt":"2022-08-30T15:13:42","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/google-maps-request-returning-cannot-set-property-position-of-undefined-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:13:42","modified_gmt":"2022-08-30T15:13:42","slug":"google-maps-request-returning-cannot-set-property-position-of-undefined-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/google-maps-request-returning-cannot-set-property-position-of-undefined-collection-of-common-programming-errors\/","title":{"rendered":"Google maps request returning &ldquo;Cannot set property &#39;position&#39; of undefined&rdquo;-Collection of common programming errors"},"content":{"rendered":"<p>Am trying to display a location on a map using goolge maps, with the function below<\/p>\n<pre><code>function show_map(options) {\n            var mapOptions = {\n                center: new google.maps.LatLng(options.lat, options.lng),\n                zoom: 12,\n                mapTypeId: google.maps.MapTypeId.ROADMAP\n            };\n\n              var map = new google.maps.Map($(\"#map-canvas\"),mapOptions);\n        }\n<\/code><\/pre>\n<p>and i get this error &#8220;Cannot set property &#8216;position&#8217; of undefined&#8221;. What might the problem be?<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-09 23:36:56. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Am trying to display a location on a map using goolge maps, with the function below function show_map(options) { var mapOptions = { center: new google.maps.LatLng(options.lat, options.lng), zoom: 12, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map($(&#8220;#map-canvas&#8221;),mapOptions); } and i get this error &#8220;Cannot set property &#8216;position&#8217; of undefined&#8221;. What might the problem be? Originally [&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-1179","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1179","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=1179"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1179\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}