Open davidfurlong opened 6 years ago
How I solved it:
For vertical shift (in my case, when the map in a part of scrollable page) I replaced
boundingRect_ = boundingRect_ || e.currentTarget.getBoundingClientRect();
with
boundingRect_ = e.currentTarget.getBoundingClientRect();
For horizontal shift issue (when map-container DIV is dynamic and can be h-resized) I've added in parent component listener for that DIV width resizing and added nex trigger to this listener:
window.dispatchEvent(new Event("resize"));
See your example http://istarkov.github.io/google-map-react/map/main/