Add prop onTilesLoaded#615
Conversation
package.json
Outdated
There was a problem hiding this comment.
Sorry for that. I needed to publish the component in order to use it in a project. I'll remove it on master.
package.json
Outdated
There was a problem hiding this comment.
Lets not make a version from this PR, version will be bumped when necessary with one or multiple PRs
| Directly access the maps API - *use at your own risk!* | ||
|
|
||
| #### onTilesLoaded (func) | ||
|
|
|
I've applied all changes, please have another look @itsmichaeldiego. |
itsmichaeldiego
left a comment
There was a problem hiding this comment.
Great work man! I just left a very minor comment, looking forward to merge this asap.
CHANGELOG.md
Outdated
There was a problem hiding this comment.
@jonathanweiss Can we move this section to the bottom? And also, no need of add Unreleased as I am going to release it very soon after merged.
There was a problem hiding this comment.
Sure thing, I've removed that header. Not sure if I understand you correctly: you want me to move the entries for unreleased things to the bottom of the change log file?
|
Can you delete the latest commit? Only the maintainers set the version releases |
src/google_map.js
Outdated
There was a problem hiding this comment.
Should we add the listener all the times, or only when the user has set an onTilesLoaded prop? What do you think?
There was a problem hiding this comment.
At first I thought that this is just a micro optimisation, but this event is triggered a lot when the user is changing the viewport of the map. So it makes sense not to listen to the event if we don't need to. 👍
|
@jonathanweiss Changes are looking great now! Thank you, I left a question for you before we merge this. |
|
Now we don't need |
|
@jonathanweiss What do you mean by that we don't need it any longer? |
|
Well, all that it does is checking if |
|
@jonathanweiss This is fine like this, thanks though! |
|
Can someone please update the typescript definition to match as I could really do with the onTilesLoaded event. https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/google-map-react/index.d.ts |
|
@jsharland Type Definition are now up2date. |
* '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)
|
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. |
There are some events that are fired by the Google Maps JavaScript API, but there are not available on the React component. With this PR, I'm passing through the event
tilesloaded.Please let me know what you think about this. I'd love to see my changes upstream.