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

feat(Declarative Bounds) specify map bounds via props #64

Closed
wants to merge 2 commits into from

Conversation

petebrowne
Copy link
Contributor

This adds support for specifying the map bounds via props. This allows you to use the GoogleMaps component in a standard declarative way, instead of interacting with the map instance.

/*eslint-enable no-unused-vars */
var {instance} = this.state;

if (bounds) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why deletion is needed when bounds is present?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I understand it, fitBounds actually sets zoom/center. So this is a precaution to prevent the map from jumping around.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks!

@tomchentw
Copy link
Owner

Released as v.1.7.0

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

Successfully merging this pull request may close these issues.

2 participants