title: How to add markers in react-google-maps?
body: <p>Using React JS in <a href="https://www.meteor.com/" rel="nofollow noreferrer">Meteor 1.5</a></p>
  
  <p><strong>Question</strong>: Need a way to add <strong>Marker</strong> using
  <a href="https://github.com/tomchentw/react-google-maps" rel="nofollow noreferrer">react-google-maps</a></p>
  
  <p>Using ES6 and in JSX format</p>
  
  <p>Followed the documentation and was able to get the map embedded in, but not able to add the marker.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>const InitialMap = withGoogleMap(props =&gt; {
    var index = this.marker.index || [];
  
    return(
      &lt;GoogleMap
        ref={props.onMapLoad}
        defaultZoom={14}
        defaultCenter={{lat: 40.6944, lng:-73.9213}}
        &gt;
          &lt;Marker
            key={index}
            position={marker.position}
            onClick={() =&gt; props.onMarkerClick(marker)}
          /&gt;
        &lt;/GoogleMap&gt;
    )
  });
  
  export default class MapContainer extends Component{
    constructor(props){
      this.state = {
        markers:[{
          position:{
            lat: 255.0112183,
            lng:121.52067570000001,
          }
        }]
      }
    }
    render(){
      return(
        &lt;div style={{height:"100%"}}&gt;
          &lt;InitialMap
            containerElement={
              &lt;div style={{height:"100%"}}/&gt;
            }
            mapElement={
              &lt;div style={{height:"100%"}} /&gt;
            }
            markers={this.state.markers} /&gt;
        &lt;/div&gt;
      )
    }
  }
  </code></pre>