In my e-commerce application I need to plot my nearby stores in Bing map, And my another requirement is during the time of zooming and paning the map I need to update my stores based on the map centre. So for implementing this I primarily choose the traditional way of coding. The steps are given below.
Initial launch I will send the api request for location and will plot the stores on Map.
During the Google search I found many suggestions regarding using Microsoft Rx framework to implement similar functionality. But didn’t get any proper code samples to achieve my goal. Can anyone please help me or guide me to solve my issue. Remember I need to plot on an average of 400 stores in map on a single request.
Regards,
Stez.
It sounds like you're just saturating the connection and/or server with multiple requests as the events come while zooming. What you want to do is avoid making the API call directly from that event. Instead, you can just start a timer (or restart, if already running). That way, you can buffer those repeated events until the user stops zooming and then only submit one API request.
Of course, you'll have to play with the duration of that timer to find the balance between waiting for events to finish, and giving the user a responsive update :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With