{"action":"created","issue":{"url":"https://api.github.com/repos/istarkov/google-map-react/issues/385","repository_url":"https://api.github.com/repos/istarkov/google-map-react","labels_url":"https://api.github.com/repos/istarkov/google-map-react/issues/385/labels{/name}","comments_url":"https://api.github.com/repos/istarkov/google-map-react/issues/385/comments","events_url":"https://api.github.com/repos/istarkov/google-map-react/issues/385/events","html_url":"https://github.com/istarkov/google-map-react/issues/385","id":229518958,"number":385,"title":"Delete overlay with timeout","user":{"login":"avigmati","id":3783945,"avatar_url":"https://avatars2.githubusercontent.com/u/3783945?v=3","gravatar_id":"","url":"https://api.github.com/users/avigmati","html_url":"https://github.com/avigmati","followers_url":"https://api.github.com/users/avigmati/followers","following_url":"https://api.github.com/users/avigmati/following{/other_user}","gists_url":"https://api.github.com/users/avigmati/gists{/gist_id}","starred_url":"https://api.github.com/users/avigmati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avigmati/subscriptions","organizations_url":"https://api.github.com/users/avigmati/orgs","repos_url":"https://api.github.com/users/avigmati/repos","events_url":"https://api.github.com/users/avigmati/events{/privacy}","received_events_url":"https://api.github.com/users/avigmati/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-17T23:55:55Z","updated_at":"2017-05-18T00:07:19Z","closed_at":"2017-05-18T00:05:31Z","body":"I want to remove the overlay in 3 seconds after mounting the Map component in the DOM, but I get an exception: \"Uncaught TypeError: ov.setMap is not a function\". What am I doing wrong?\r\n\r\n```javascript\r\nconst ov = <OverlayView\r\n    position={{lat: 51.47879, lng: 0.0}}\r\n    mapPaneName={OverlayView.MAP_PANE}\r\n>\r\n    <div>\r\n        <h1>Overlay</h1>\r\n    </div>\r\n</OverlayView>;\r\n \r\nconst GMap = withGoogleMap(props => (\r\n \r\n    <GoogleMap\r\n        defaultZoom={2}\r\n        defaultCenter={{ lat: 51.47879, lng: 0.0 }}\r\n    >\r\n    {ov}\r\n \r\n    </GoogleMap>\r\n));\r\n \r\nclass Map extends React.Component{\r\n    constructor(props, context) {\r\n        super(props, context);\r\n    }\r\n \r\n    componentDidMount() {\r\n// Here I want to remove the overlay in 3 seconds after mounting the Map component in the DOM, \r\n// but I get an exception: \"Uncaught TypeError: ov.setMap is not a function\"\r\n// What am I doing wrong?\r\n        setTimeout(function () {\r\n            ov.setMap(null);\r\n        }, 3000);\r\n    }\r\n \r\n    render() {\r\n        return (\r\n            <GMap\r\n                containerElement={\r\n                    <div style={{ height: '600px' }} />\r\n                }\r\n                mapElement={\r\n                    <div style={{ height: '600px' }} />\r\n                }\r\n            />\r\n        );\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/istarkov/google-map-react/issues/comments/302264504","html_url":"https://github.com/istarkov/google-map-react/issues/385#issuecomment-302264504","issue_url":"https://api.github.com/repos/istarkov/google-map-react/issues/385","id":302264504,"user":{"login":"avigmati","id":3783945,"avatar_url":"https://avatars2.githubusercontent.com/u/3783945?v=3","gravatar_id":"","url":"https://api.github.com/users/avigmati","html_url":"https://github.com/avigmati","followers_url":"https://api.github.com/users/avigmati/followers","following_url":"https://api.github.com/users/avigmati/following{/other_user}","gists_url":"https://api.github.com/users/avigmati/gists{/gist_id}","starred_url":"https://api.github.com/users/avigmati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avigmati/subscriptions","organizations_url":"https://api.github.com/users/avigmati/orgs","repos_url":"https://api.github.com/users/avigmati/repos","events_url":"https://api.github.com/users/avigmati/events{/privacy}","received_events_url":"https://api.github.com/users/avigmati/received_events","type":"User","site_admin":false},"created_at":"2017-05-18T00:07:19Z","updated_at":"2017-05-18T00:07:19Z","body":"Sorry, missed the repository))"}}
{"actor":{"display_login":"avigmati"}}