{"action":"created","issue":{"url":"https://api.github.com/repos/dburles/meteor-google-maps/issues/123","repository_url":"https://api.github.com/repos/dburles/meteor-google-maps","labels_url":"https://api.github.com/repos/dburles/meteor-google-maps/issues/123/labels{/name}","comments_url":"https://api.github.com/repos/dburles/meteor-google-maps/issues/123/comments","events_url":"https://api.github.com/repos/dburles/meteor-google-maps/issues/123/events","html_url":"https://github.com/dburles/meteor-google-maps/issues/123","id":163600834,"number":123,"title":"Google Places \"Uncaught TypeError: this.j.getElementsByTagName is not a function\"","user":{"login":"NicholasEli","id":5045760,"avatar_url":"https://avatars.githubusercontent.com/u/5045760?v=3","gravatar_id":"","url":"https://api.github.com/users/NicholasEli","html_url":"https://github.com/NicholasEli","followers_url":"https://api.github.com/users/NicholasEli/followers","following_url":"https://api.github.com/users/NicholasEli/following{/other_user}","gists_url":"https://api.github.com/users/NicholasEli/gists{/gist_id}","starred_url":"https://api.github.com/users/NicholasEli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicholasEli/subscriptions","organizations_url":"https://api.github.com/users/NicholasEli/orgs","repos_url":"https://api.github.com/users/NicholasEli/repos","events_url":"https://api.github.com/users/NicholasEli/events{/privacy}","received_events_url":"https://api.github.com/users/NicholasEli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-04T04:26:28Z","updated_at":"2016-07-04T18:41:11Z","closed_at":null,"body":"Hello @dburles I am using this with mdg:geolocation and everything seems to be working great. However when I try to use the Google Places library I get the following error \"**Uncaught TypeError: this.j.getElementsByTagName is not a function**\".\r\n\r\nI can get Places to work outside of Meteor but it seems to stop working inside the \"**GoogleMaps.ready**\" instance. It stops specifically at \"**new google.maps.places.PlacesService**\" instance. I found the same issue on Stack Overflow but there was no accepted solution. \r\n\r\nAny ideas on how to get the library to work within your package?"},"comment":{"url":"https://api.github.com/repos/dburles/meteor-google-maps/issues/comments/230340242","html_url":"https://github.com/dburles/meteor-google-maps/issues/123#issuecomment-230340242","issue_url":"https://api.github.com/repos/dburles/meteor-google-maps/issues/123","id":230340242,"user":{"login":"NicholasEli","id":5045760,"avatar_url":"https://avatars.githubusercontent.com/u/5045760?v=3","gravatar_id":"","url":"https://api.github.com/users/NicholasEli","html_url":"https://github.com/NicholasEli","followers_url":"https://api.github.com/users/NicholasEli/followers","following_url":"https://api.github.com/users/NicholasEli/following{/other_user}","gists_url":"https://api.github.com/users/NicholasEli/gists{/gist_id}","starred_url":"https://api.github.com/users/NicholasEli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicholasEli/subscriptions","organizations_url":"https://api.github.com/users/NicholasEli/orgs","repos_url":"https://api.github.com/users/NicholasEli/repos","events_url":"https://api.github.com/users/NicholasEli/events{/privacy}","received_events_url":"https://api.github.com/users/NicholasEli/received_events","type":"User","site_admin":false},"created_at":"2016-07-04T18:41:11Z","updated_at":"2016-07-04T18:41:11Z","body":"Hello @dburles , here is what I have written.\r\n\r\n`Meteor.startup(function() {  \r\n  GoogleMaps.load({\r\n  \tv : '3',\r\n  \tkey: 'mYKeyinHereBLAHABLAHBLAH',\r\n  \tlibraries: 'places'\r\n  });\r\n});\r\n\r\nTemplate.map.helpers({ \r\n\t//get current lat & lng and create map \r\n  \tgeolocationError: function() {\r\n    \tlet error = Geolocation.error();\r\n    \treturn error && error.message;\r\n  \t},\r\n  \tmapOptions: function() {\r\n    \tlet latLng = Geolocation.latLng();\r\n    \t// Initialize the map once we have the latLng.\r\n    \tif (GoogleMaps.loaded() && latLng) {\r\n\t      \treturn {\r\n\t        \tcenter: new google.maps.LatLng(latLng.lat, latLng.lng),\r\n\t        \tzoom: 15\r\n\t      \t};\r\n    \t}\r\n  \t}\r\n});\r\n\r\nTemplate.map.onRendered(function() { \r\n\tlet self = this; \r\n\r\n  \tGoogleMaps.ready('map', function(map) {\r\n    \tlet latLng = Geolocation.latLng();\r\n\r\n    \tlet marker;\r\n    \tself.autorun(function() {\r\n    \t\t//set user location\r\n\t    \tlet marker = new google.maps.Marker({\r\n\t      \t\tposition: new google.maps.LatLng(latLng.lat, latLng.lng),\r\n\t      \t\tmap: map.instance\r\n\t    \t});\r\n\t    \tmarker.setPosition(latLng);\r\n\t    \tmap.instance.setCenter(marker.getPosition());\r\n\t      \tmap.instance.setZoom(15);\r\n\r\n\t      \t//google places\r\n\t      \tlet Places = function(locationType){\r\n\t      \t\tthis.locationType = locationType;\r\n\r\n\t      \t\tlet place = new google.maps.places.PlacesService(map);\r\n\t      \t\tplace.nearbySearch({\r\n\t    \t\t\tlocation: latLng,\r\n\t    \t\t\tradius: 16100, //10 mile radius\r\n\t    \t\t\tkeyword: [locationType]\r\n\t\t\t\t}, getPlace);\r\n\r\n\t\t\t\tfunction getPlace(results, status) {\r\n\t\t\t\t  \tif (status === google.maps.places.PlacesServiceStatus.OK) {\r\n\t\t\t\t    \tfor (let i = 0; i < results.length; i++) {\r\n\t\t\t\t    \t\tconsole.log(results[i]);\r\n\t\t\t\t      \t\tcreatePlaceMarkers(results[i]);\r\n\t\t\t\t    \t}\r\n\t\t\t\t  \t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfunction createPlaceMarkers(place) {\r\n\t\t\t\t\tlet placeLocation \t= place.geometry.location,\r\n\t\t\t\t\t\tplaceMaker \t= new google.maps.Marker({\r\n\t\t\t\t    \t\tmap: map,\r\n\t\t\t\t    \t\tposition: place.geometry.location,\r\n\t\t\t\t\t \tdraggable:false,\r\n\t\t\t\t\t \tzIndex: 9997\r\n\t\t\t\t \t\t});\r\n\t\t\t\t}\r\n\t      \t}\r\n\r\n\t      \tlet bars = new Places('Bar'),\r\n                    club = new Places('Night Club');\r\n\r\n\t    });\r\n  \t});\r\n});`"}}
{"actor":{"display_login":"NicholasEli"}}