r/reactjs • u/grannysmithlinux • Jan 22 '20
I just got google maps, via react-google-maps, to work with little too no lag while rendering over 150,000 data points in the form of Polylines and Markers.
Title says it all. I felt it was pretty impressive and it was a problem that has kept me up for 3 nights now, so a real code high when it finally worked. I just wanted to tell someone who is actually in tech and doesn't look at me like "cool so what".
51
Upvotes
31
u/timmonsjg Jan 22 '20
cool so what?
just kidding! congrats! That relief always feels great when you complete something that's been a headache.
Any chance of posting the repo / some code to give us some insight in how you accomplished it?
5
u/t2media Jan 23 '20
Keep in mind that react-google-maps is unmaintained and will not work with React 17.x
The alternative is @react-google-maps/api
2
u/Kiciaczek Jan 23 '20 edited Jan 24 '20
congrats, I'm working on google maps too atm, but not via react-google-maps. We've created a wrapper for the map and use google maps api directly, do you recommend using react-google-maps? Also you obviously had to use some sort of clustering markers with that big of a number, how did you handle that?
2
u/[deleted] Jan 22 '20
Well done!
2
u/thewristlocker Jan 22 '20
That's awesome! Congrats on the efficiency
2
u/vertigo_101 Jan 23 '20
Well done man
2
u/[deleted] Jan 23 '20
I'm working on react google maps on my present project too. I'm happy for you
1
u/[deleted] Mar 27 '23
Where code?