Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this._mapComponent is not defined #440

Closed
michaeltheodore048 opened this issue Feb 26, 2017 · 2 comments
Closed

this._mapComponent is not defined #440

michaeltheodore048 opened this issue Feb 26, 2017 · 2 comments

Comments

@michaeltheodore048
Copy link

I copy all the code you give, but "Uncaught ReferenceError: this._mapComponent is not defined" appear, can u tell me where's the _mapComponent?

@michaeltheodore048 michaeltheodore048 changed the title _mapComponent is not defined this._mapComponent is not defined Feb 26, 2017
@imdevan
Copy link

imdevan commented Mar 8, 2017

In my project I have something like the following to access the map component.

const Map = React.createClass({
  handleMapMounted(map) {
    this._map = map;
  },
  render() {
    const GoogleMapComponent = withGoogleMap(props => (
      <GoogleMap>
         // other props
      </GoogleMap>
    ));

    return (
      <GoogleMapComponent
        // other props
        onMapMounted={this.handleMapMounted}
      />
    )
  }
});

Does that answer your question? (I'm a user not a contributor)

@tomchentw
Copy link
Owner

Please refer to Getting Help section in the README (or #469).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants