{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleWebComponents/google-map/issues/185","labels_url":"https://api.github.com/repos/GoogleWebComponents/google-map/issues/185/labels{/name}","comments_url":"https://api.github.com/repos/GoogleWebComponents/google-map/issues/185/comments","events_url":"https://api.github.com/repos/GoogleWebComponents/google-map/issues/185/events","html_url":"https://github.com/GoogleWebComponents/google-map/issues/185","id":101031762,"number":185,"title":"_initGMap: Intermittent google.maps.Map undefined Error","user":{"login":"chrisbateskeegan","id":1533422,"avatar_url":"https://avatars.githubusercontent.com/u/1533422?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisbateskeegan","html_url":"https://github.com/chrisbateskeegan","followers_url":"https://api.github.com/users/chrisbateskeegan/followers","following_url":"https://api.github.com/users/chrisbateskeegan/following{/other_user}","gists_url":"https://api.github.com/users/chrisbateskeegan/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisbateskeegan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisbateskeegan/subscriptions","organizations_url":"https://api.github.com/users/chrisbateskeegan/orgs","repos_url":"https://api.github.com/users/chrisbateskeegan/repos","events_url":"https://api.github.com/users/chrisbateskeegan/events{/privacy}","received_events_url":"https://api.github.com/users/chrisbateskeegan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-14T15:12:46Z","updated_at":"2015-08-18T00:22:40Z","closed_at":null,"body":"This is an odd, difficult to reproduce problem that may well be as a result of my imperfect understanding of the Polymer bootstrap process. In a simple page it doesn't occur, but it seems the deeper into the page my element is embedded the worse it gets. Gist is as follows:\r\n\r\nhttps://gist.github.com/chrisbateskeegan/65d5853459a8a4f8ab88\r\n\r\nWith the 1.0.4 code this will result in the error 60-70% of the time. Fixing it is as simple as changing _initGMap to protect against 'api not loaded' as follows:\r\n\r\n    if (!(window.google && google.maps.Map)) {\r\n        return; // api not loaded\r\n    }\r\n\r\nrather than:\r\n    if (!(window.google && window.google.maps)) {\r\n        return; // api not loaded\r\n    }\r\n\r\nI don't know the wider implications of this in terms of the bootstrap process and it may well be misuse on my part but I'd be interested to know either way."},"comment":{"url":"https://api.github.com/repos/GoogleWebComponents/google-map/issues/comments/132003396","html_url":"https://github.com/GoogleWebComponents/google-map/issues/185#issuecomment-132003396","issue_url":"https://api.github.com/repos/GoogleWebComponents/google-map/issues/185","id":132003396,"user":{"login":"atotic","id":127453,"avatar_url":"https://avatars.githubusercontent.com/u/127453?v=3","gravatar_id":"","url":"https://api.github.com/users/atotic","html_url":"https://github.com/atotic","followers_url":"https://api.github.com/users/atotic/followers","following_url":"https://api.github.com/users/atotic/following{/other_user}","gists_url":"https://api.github.com/users/atotic/gists{/gist_id}","starred_url":"https://api.github.com/users/atotic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atotic/subscriptions","organizations_url":"https://api.github.com/users/atotic/orgs","repos_url":"https://api.github.com/users/atotic/repos","events_url":"https://api.github.com/users/atotic/events{/privacy}","received_events_url":"https://api.github.com/users/atotic/received_events","type":"User","site_admin":false},"created_at":"2015-08-18T00:22:40Z","updated_at":"2015-08-18T00:22:40Z","body":"Glad I was not the one trying to debug this :)"}}