google-map-react
google-map-react copied to clipboard
How can I set marker's location inside of Marker's component?
I'm using redux and have to render an array of markers. I tried to normalize the array and only use keys of normalized array to iterate the marks and let marks render themselves in their own components. Is it possible with this library?
Yes it's possible, but not easy ;-)
In most cases even with redux it's better to write a selector for array items,
as having lat, lng at map level will allow you to filter items, (As there is no need to render markers outside map bounds) Or create clusters http://istarkov.github.io/google-map-clustering-example/
Thank you! Just figured out that I've over thought a little bit.