AnsweredAssumed Answered

SetViewpointCenterAsync not always centering on correct MapPoint

Question asked by will.lockwood on Jan 3, 2018
Latest reply on Jan 3, 2018 by mnielsen-esristaff

Hello,

 

In my application I call SetViewpointCenterAsync(MapPoint center, double scale), with scale being the current scale of the map. Most of the time it centers correctly on the MapPoint I pass in, but there are times where it centers on a MapPoint that's different from the one I passed in.

 

I can't see a common trend when it's different - sometimes the point it's centered on is north, sometimes is south, sometimes is west, sometimes is southwest, etc. of the MapPoint it's supposed to be centered on. At first I thought maybe it was being interrupted by another view navigation (thus returning false) which was causing this, but I have verified in my logs that the method is still returning true when not centering correctly, which I interpret as the set view animation is completing and thus should be centered correctly.  I have also verified that in these cases there are not other MapView methods being called around the same time, which could also potentially cause this issue.

 

I was wondering if there's perhaps a known bug that causes SetViewpointCenterAsync correctly (doubtful, but want to confirm since I have been looking into this for awhile and am stumped why it's not working sometimes). If not, could there be something wrong with how/when I'm calling it, or the parameters I'm passing in?

Outcomes