Hi All,
I've subscribed ViewpointChanged event and running some code whenever map extent changes or zoom in/out.
I observed that whenever I interact with map e.g. zoom in/out event get fired multiple times(3-4) and along with that code executes and slow down the performance.
How can I prevent event execution multiple times or just capture the last instance?
Version: WPF 100.8
Any help would be appreciated.
Regards,
Prashant
Solved! Go to Solution.
As you're zooming or panning, the viewpoint is changing and therefore the event is firing. You don't want to run a bunch of heavy operations in that event.
If you need to run some more expensive code, I'd recommend you use the NavigationCompleted event, which is more meant for that sort of thing.
As you're zooming or panning, the viewpoint is changing and therefore the event is firing. You don't want to run a bunch of heavy operations in that event.
If you need to run some more expensive code, I'd recommend you use the NavigationCompleted event, which is more meant for that sort of thing.
Thanks Morten for reply. It's working !!!