-
Notifications
You must be signed in to change notification settings - Fork 936
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
expose Public API's to ScriptjsGoogleMap #145
Conversation
The warning issue is fixed by #143. For the issue of |
* Closes #145 * Ref #92 BREAKING CHANGE: rename from async/ScriptjsGoogleMap to async/ScriptjsLoader and changed behavior from wrapping to delegation of GoogleMap element To migrate the code follow the example below (extracted from examples/gh-pages migration): Before: <ScriptjsLoader hostname={"maps.googleapis.com"} pathname={"/maps/api/js"} query={{v: `3.${ AsyncGettingStarted.version }`, libraries: "geometry,dr awing,places"}} } // <GoogleMap> props defaultZoom={3} defaultCenter={{lat: -25.363882, lng: 131.044922}} onClick={::this._handle_map_click} /> After: <ScriptjsLoader hostname={"maps.googleapis.com"} pathname={"/maps/api/js"} query={{v: `3.${ AsyncGettingStarted.version }`, libraries: "geometry,drawing,places"}} googleMapElement={ <GoogleMap defaultZoom={3} defaultCenter={{lat: -25.363882, lng: 131.044922}} onClick={::this._handle_map_click} /> } />
Please help me review on #150, thanks! |
* Mark async/ScriptjsGoogleMap as deprecated * Closes #145 * Ref #92 BREAKING CHANGE: migrate from async/ScriptjsGoogleMap to async/ScriptjsLoader and changed its behavior from implicit inheritance to simple delegation To migrate the code follow the example below (extracted from examples/gh-pages migration): Before: <ScriptjsLoader hostname={"maps.googleapis.com"} pathname={"/maps/api/js"} query={{v: `3.exp`, libraries: "geometry,dr awing,places"}} } // <GoogleMap> props defaultZoom={3} defaultCenter={{lat: -25.363882, lng: 131.044922}} onClick={::this._handle_map_click} /> After: <ScriptjsLoader hostname={"maps.googleapis.com"} pathname={"/maps/api/js"} query={{v: `3.exp`, libraries: "geometry,drawing,places"}} googleMapElement={ <GoogleMap defaultZoom={3} defaultCenter={{lat: -25.363882, lng: 131.044922}} onClick={::this._handle_map_click} /> } />
* Mark async/ScriptjsGoogleMap as deprecated * Closes #145 * Ref #92 BREAKING CHANGE: migrate from async/ScriptjsGoogleMap to async/ScriptjsLoader and changed its behavior from implicit inheritance to simple delegation To migrate the code follow the example below (extracted from examples/gh-pages migration): Before: ```js <ScriptjsLoader hostname={"maps.googleapis.com"} pathname={"/maps/api/js"} query={{v: `3.exp`, libraries: "geometry,drawing,places"}} // // <GoogleMap> props defaultZoom={3} defaultCenter={{lat: -25.363882, lng: 131.044922}} onClick={::this._handle_map_click} /> ``` After: ```js <ScriptjsLoader hostname={"maps.googleapis.com"} pathname={"/maps/api/js"} query={{v: `3.exp`, libraries: "geometry,drawing,places"}} // googleMapElement={ <GoogleMap defaultZoom={3} defaultCenter={{lat: -25.363882, lng: 131.044922}} onClick={::this._handle_map_click} /> } /> ```
Released v4.5.0 |
Thanks for the inspiration from @mattjstar. I also update the synchronous version to a loader approach in #157. Make sure to check it out for latest update of async API as well. |
I'd love to hear your thoughts on this. We're using the async ScriptjsGoogleMap implementation and we need access to the Public Api's specifically fitBounds.
Also the warning doesn't support object equality, so I decided to hide it: