-
Notifications
You must be signed in to change notification settings - Fork 943
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
Remove react-google-maps dependency #1389
Conversation
c3dcd85
to
ee258b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will submit this partial review already now for you to read. I still have to review the largest file.
{...rest} | ||
/> | ||
<div | ||
id="map" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a bit too prone to conflict. If the id is really required, could it come as a prop from the page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd keep the id because Google Maps is quite difficult to debug without some document.getElementById()
calls from DevTools. (The element on those map panes are not selectable by right-clicking on top of the map.)
Anyway, I passed the id ("searchMap") from SearchMap component, but I didn't push it further than that. (And anyway, it's unlikely that there's more than one SearchMap instance since it takes 2/5 of the entire screen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is unlikely that a page in the app will have multiple search maps. However, we do have plans to use the styleguide more for lots of things like map variants etc., so it would be helpful to be able to define unique IDs there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Showing these components, that take the entire-screen into use, needs some thinking. However, the change I made now should allow different ids to be passed for the SearchMap component.
ee258b9
to
637c5b3
Compare
637c5b3
to
858b929
Compare
react-google-maps library has been unmaintained for 3 years.
Google Maps integration will be operated without any react wrapper library from now on.
We just need a couple of classes from Google Maps API:
OverlayView is definitely the most complex setup. Luckily, part of the work to support it without react-google-maps was already done with some old bug fixes that were made on top of react-google-maps and generalization made to support Mapbox.
Other notes: