phoique
phoique

Reputation: 107

react google maps find midpoint

I am using the @react-google-maps/api package. I get the midpoint with onCenterChanged. My problem here is that every time the user drags it gives me the midpoint. Is it possible for me to get the midpoint as soon as the user releases their drag? I will send a fetch request and get results. According to the current system, it constantly sends requests in each movement.

Upvotes: 0

Views: 175

Answers (1)

phoique
phoique

Reputation: 107

I solved my problem. The dragend event completely solved my problem. see: google-maps-react get marker position on drag end

Upvotes: 1

Related Questions