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

Fix/library loader #681

Conversation

DonovanDeSmedt
Copy link
Contributor

@DonovanDeSmedt DonovanDeSmedt commented Nov 21, 2018

Possible fix for issue 673:

Supports both the previous and current way of loading libraries:

Previous way:

<GoogleMapReact
          bootstrapURLKeys={{
            libraries: 'drawing',
            key: googleMapKey,
          }}
          yesIWantToUseGoogleMapApiInternals
          onGoogleApiLoaded={({ maps }) => {
            console.log(maps.drawing);
          }}
        />

Current way:

<GoogleMapReact
          bootstrapURLKeys={{
            key: googleMapKey,
          }}
          drawingLibrary
          yesIWantToUseGoogleMapApiInternals
          onGoogleApiLoaded={({ maps }) => {
            console.log(maps.drawing);
          }}
        />

When prop updateHeatmap is set to true --> map will rerender.
- New render of <GoogleMapReact> and data is changed, prop updateHeatmap should be true
- New render of <GoogleMapReact> and data is not changed, prop updateHeatmap should be false
* 'master' of github.com:google-map-react/google-map-react:
  Bump to 1.1.1 (google-map-react#680)
  Revert "Added feature: update heat map on data change + fix linting" (google-map-react#679)
  Bump version to 1.1.0 (google-map-react#671)
  Added feature: update heat map on data change + fix linting (google-map-react#593)
  Pass map instance to onDrag handler (google-map-react#656)
  add math abs to avoid negative values when calculating zoom (google-map-react#655)
  Bump version to 1.0.9 (google-map-react#651)
  Custom div style options (google-map-react#634)
  Bump version to 1.0.8 (google-map-react#646)
  Revert 643 fix/map context (google-map-react#645)
  Bump version to 1.0.7 (google-map-react#644)
  Add passive scroll (google-map-react#631)
  Use React 16 portal to render map overlay (google-map-react#643)
  Fix old examples links and add one to new examples (google-map-react#633)
  Bump version to 1.0.6 (google-map-react#621)
  Add prop `onTilesLoaded` (google-map-react#615)
  Fix typo, and call fromContainerPixelToLatLng() as you would expect. (google-map-react#620)
  Update API.md (google-map-react#611)
  Upgrade version to 1.0.5 (google-map-react#607)
  Remove marker jiggle. (google-map-react#603)
@itsmichaeldiego
Copy link
Member

@DonovanDeSmedt Great work, thank you so much!

I would keep only the old way, both ways make it more confusing and will lead into conflicts.

Also keep in mind I had to revert your previous PR because builds were failing for some people

@DonovanDeSmedt
Copy link
Contributor Author

Ok, I'll remove this one and create a new one for some of the changes of the previous PR.

@DonovanDeSmedt DonovanDeSmedt deleted the fix/library_loader branch November 26, 2018 19:01
@itsmichaeldiego
Copy link
Member

Awesome @DonovanDeSmedt thank you so much!

@lock
Copy link

lock bot commented Dec 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants