hkajava / s2g

Students2Groups Meteor application. Noticed in Spanish conversation class that the teacher doesn't have a good method to divide students into small groups for conversation so this application will provide easy way to do that. Also testing Meteor/React technologies with this application.
MIT License
1 stars 0 forks source link

Add world map about where the s2g users are located. Check Icescrum website. #28

Closed hkajava closed 6 years ago

hkajava commented 6 years ago

Icescrum site used some wordpress plugin.

Decided to use revolver maps. Looks the best and is free to use. User location recording is done by revolvermap server.

Had to google around a little to understand how to inject the script into meteor react component.

Used this: https://stackoverflow.com/questions/34424845/adding-script-tag-to-react-jsx

import React from 'react';

export default class Test extends React.Component { constructor(props) { super(props); }

componentDidMount() { const s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.innerHTML = "document.write('This is output by document.write()!')"; this.instance.appendChild(s); }

render() { return <div ref={el => (this.instance = el)} />; } }

Here is result:

hkajava commented 6 years ago

image.png