Giter Site home page Giter Site logo

Comments (9)

MicheleBertoli avatar MicheleBertoli commented on June 19, 2024

Hey @neilff, I can't reproduce the error.
If I just run the demo snippet, I get this onMapCreated Zk {gm_bindings_: Object, __gm: Ii, gm_accessors_: Object, center: lf, zoom: 12…} in the console.
Can you please provide me a full non-working example?
Thanks!

from react-gmaps.

neilff avatar neilff commented on June 19, 2024

Interesting, I'm using Immutable, WebPack, Babel in my stack, I don't think that should cause any issues however... When I open source this project I'm working on, I can provide you the example of where it failed for me.

from react-gmaps.

loktar00 avatar loktar00 commented on June 19, 2024

This is happening with me as well I am using react-router wondering if something with that is causing issues. On refresh it always works perfectly, however when switching pages it doesn't.. still looking into it on my end, @neilff fix didn't work for my case.

from react-gmaps.

MicheleBertoli avatar MicheleBertoli commented on June 19, 2024

Hey @loktar00, thanks for the feedback!
I absolutely want to fix that, can you please share with me a non-working example?
We are using both react-gmaps and react-router in production at BIZZBY without any errors, I really need help from you guys to find the problem.
Thanks!

from react-gmaps.

jnmandal avatar jnmandal commented on June 19, 2024

I didn't get this exact error, but the problem could be that you need to bind this. Ie:

onMapCreated={this.onMapCreated.bind(this)}

I absent mindedly copy-pasted the example to play around and was getting a "Uncaught TypeError: Cannot read property 'Gmaps' of undefined" until I added the binding.

Using webpack with babel-loader and react-hot.

from react-gmaps.

MicheleBertoli avatar MicheleBertoli commented on June 19, 2024

@neilff checking your react-liqbo repo, I found and fixed the problem. Thanks!

@jnmandal it looks like you are using ES6 Classes, right?

from react-gmaps.

jnmandal avatar jnmandal commented on June 19, 2024

Yep, using ES6 classes.. Just realized you were using React's class constructor, that explains it!

from react-gmaps.

MicheleBertoli avatar MicheleBertoli commented on June 19, 2024

@jnmandal perfect, thanks!

from react-gmaps.

neilff avatar neilff commented on June 19, 2024

@MicheleBertoli hey sorry, was away last few weeks, I'll take a look at the PR when I have a chance, thanks

from react-gmaps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.