GithubHelp home page GithubHelp logo

Comments (11)

dmitry avatar dmitry commented on June 25, 2024

You can access them directly through refs, as it's shown here: #17

from react-google-maps.

tomchentw avatar tomchentw commented on June 25, 2024

I took a day to rewrite the module from scratch on #88 . However, I remove these method from the component APIs. Do you guys think it's a good idea to remove it or keep it?

from react-google-maps.

LarryEitel avatar LarryEitel commented on June 25, 2024

I have a use case for using fitBounds. Do you expose the google map object so that it would be possible to act directly on it? Or is that philosophically improper?

from react-google-maps.

tomchentw avatar tomchentw commented on June 25, 2024

It's not a easy design decision and I certainly believe exposing it is philosophically improper. But I cannot come up with a better way other than exposing getter though ...

from react-google-maps.

LarryEitel avatar LarryEitel commented on June 25, 2024

I would be in favor of exposing it recognizing that even though it may be improper it may be the only way to achieve something that would otherwise require scrapping the use of the project altogether. :)

from react-google-maps.

tomchentw avatar tomchentw commented on June 25, 2024

Released v2.0.0 and v2.0.1.

from react-google-maps.

outdooricon avatar outdooricon commented on June 25, 2024

Now with the rewrite, I'm pretty confused on what the correct way to use these is... especially fitBounds. I assume that panBounds is useless to set since I assume a new map is created every time state changes (is that right?). But setting fitBounds doesn't seem to actually work. Could you give us an example of how we should be setting the bounds? Thanks for this great project!

from react-google-maps.

tomchentw avatar tomchentw commented on June 25, 2024

State changes will only be applied when you have controlled properties. Try calling fitBounds in your cDU?

from react-google-maps.

outdooricon avatar outdooricon commented on June 25, 2024

isn't fitbounds a controlled property?

from react-google-maps.

tomchentw avatar tomchentw commented on June 25, 2024

@outdooricon it's public APIs from the ref: http://git.io/vGc4H

from react-google-maps.

outdooricon avatar outdooricon commented on June 25, 2024

Ok, I think i understand. I'm really curious what the use case of even exposing the these other properties that @LarryEitel has. It's pretty confusing to expose these if they don't really work.

from react-google-maps.

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.