{"action":"created","issue":{"url":"https://api.github.com/repos/dburles/meteor-google-maps/issues/69","labels_url":"https://api.github.com/repos/dburles/meteor-google-maps/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/dburles/meteor-google-maps/issues/69/comments","events_url":"https://api.github.com/repos/dburles/meteor-google-maps/issues/69/events","html_url":"https://github.com/dburles/meteor-google-maps/issues/69","id":102060346,"number":69,"title":"Wrapping googlemaps template on React component","user":{"login":"OkuraSt","id":9710146,"avatar_url":"https://avatars.githubusercontent.com/u/9710146?v=3","gravatar_id":"","url":"https://api.github.com/users/OkuraSt","html_url":"https://github.com/OkuraSt","followers_url":"https://api.github.com/users/OkuraSt/followers","following_url":"https://api.github.com/users/OkuraSt/following{/other_user}","gists_url":"https://api.github.com/users/OkuraSt/gists{/gist_id}","starred_url":"https://api.github.com/users/OkuraSt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OkuraSt/subscriptions","organizations_url":"https://api.github.com/users/OkuraSt/orgs","repos_url":"https://api.github.com/users/OkuraSt/repos","events_url":"https://api.github.com/users/OkuraSt/events{/privacy}","received_events_url":"https://api.github.com/users/OkuraSt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-20T04:36:51Z","updated_at":"2015-08-20T05:53:51Z","closed_at":null,"body":"Hi, this is not an issue, its a question I hope someone can help me.\r\n\r\nIm trying to wrap the googlemaps template into a react component but i cant get it to work.\r\nUsing flow router, I load the GoogleMap like so:\r\n\r\nFlowRouter.route('/googletest', {\r\n    action() {\r\n        GoogleMaps.load();\r\n        ReactLayout.render(MainLayout,{\r\n            content: <GoogleTest />\r\n        });\r\n    }\r\n});\r\n\r\nThe GoogleTest component looks like this:\r\n\r\nGoogleTest = React.createClass({\r\n    componentDidMount() {\r\n        this.view = Blaze.render(Template.mapWrapper,\r\n            React.findDOMNode(this.refs.mapContainer));\r\n    },\r\n    exampleMapOptions: function() {\r\n        // Make sure the maps API has loaded\r\n        if (GoogleMaps.loaded()) {\r\n            // Map initialization options\r\n            return {\r\n                center: new google.maps.LatLng(-37.8136, 144.9631),\r\n                zoom: 8\r\n            };\r\n        }\r\n    },\r\n    render(){\r\n        return <span ref=\"mapContainer\" />;\r\n    }\r\n});\r\n\r\nAnd this is the simple MainLayout component\r\n\r\nMainLayout = React.createClass({\r\n\r\n    render() {\r\n        return (\r\n            <div className=\"overlay\">\r\n                <main>\r\n                    <div>\r\n                        {this.props.content}\r\n                    </div>\r\n                </main>\r\n\r\n            </div>\r\n        );\r\n    }\r\n});\r\n\r\nThe mapWrapper template I'm using looks like this:\r\n\r\n<template name=\"mapWrapper\">\r\n    <div class=\"map-container\">\r\n        {{> googleMap name=\"exampleMap\" options=exampleMapOptions}}\r\n    </div>\r\n</template>\r\n\r\nI've tried to move the GoogleMaps.load() to the component code (on componentDidMount) but no look either.\r\n\r\nThanks for your time."},"comment":{"url":"https://api.github.com/repos/dburles/meteor-google-maps/issues/comments/132901535","html_url":"https://github.com/dburles/meteor-google-maps/issues/69#issuecomment-132901535","issue_url":"https://api.github.com/repos/dburles/meteor-google-maps/issues/69","id":132901535,"user":{"login":"dburles","id":319567,"avatar_url":"https://avatars.githubusercontent.com/u/319567?v=3","gravatar_id":"","url":"https://api.github.com/users/dburles","html_url":"https://github.com/dburles","followers_url":"https://api.github.com/users/dburles/followers","following_url":"https://api.github.com/users/dburles/following{/other_user}","gists_url":"https://api.github.com/users/dburles/gists{/gist_id}","starred_url":"https://api.github.com/users/dburles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dburles/subscriptions","organizations_url":"https://api.github.com/users/dburles/orgs","repos_url":"https://api.github.com/users/dburles/repos","events_url":"https://api.github.com/users/dburles/events{/privacy}","received_events_url":"https://api.github.com/users/dburles/received_events","type":"User","site_admin":false},"created_at":"2015-08-20T05:53:50Z","updated_at":"2015-08-20T05:53:50Z","body":"https://github.com/dburles/meteor-google-maps-react-example"}}