<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SetViewpointCenterAsync not always centering on correct MapPoint in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/292654#M3441</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Any chance you can try it with v100.2 ? There's been some fixes with respect to the navigation animations and cancellation.&lt;/P&gt;&lt;P&gt;If not, can you share some details about the PCs that are reproducing the issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Btw, this is how I tried to reproduce it using the tapped event:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void mapView_GeoViewTapped(object sender, Esri.ArcGISRuntime.UI.Controls.GeoViewInputEventArgs e)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var mp = GeometryEngine.Project(e.Location, SpatialReferences.Wgs84) as MapPoint;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapView.SetViewpointCenterAsync(mp, &lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;mapView.MapScale&lt;/SPAN&gt;);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it can't be reproduced in a simple app on the PC that sees the issue, it might be worth to start stripping away layers in your app till the problem goes away. It might give you a hint at what's causing it.&lt;/P&gt;&lt;P&gt;Also make sure you try and reproduce without the debugger attached. That could be a key difference between your setup and PCs where it gets recreated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jan 2018 23:43:49 GMT</pubDate>
    <dc:creator>dotMorten_esri</dc:creator>
    <dc:date>2018-01-03T23:43:49Z</dc:date>
    <item>
      <title>SetViewpointCenterAsync not always centering on correct MapPoint</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/292648#M3435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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&amp;nbsp;the MapPoint it's supposed&amp;nbsp;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.&amp;nbsp; 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 16:33:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/292648#M3435</guid>
      <dc:creator>WilliamLockwood</dc:creator>
      <dc:date>2018-01-03T16:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: SetViewpointCenterAsync not always centering on correct MapPoint</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/292649#M3436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the spatial reference of your center point always the same?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 20:13:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/292649#M3436</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2018-01-03T20:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: SetViewpointCenterAsync not always centering on correct MapPoint</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/292650#M3437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;...also does this ever happen if you use the non-async SetViewpoint method?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 20:14:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/292650#M3437</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2018-01-03T20:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: SetViewpointCenterAsync not always centering on correct MapPoint</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/292651#M3438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I am always using the WGS84 spatial reference...I have not tried to use the SetViewpoint method yet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 20:41:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/292651#M3438</guid>
      <dc:creator>WilliamLockwood</dc:creator>
      <dc:date>2018-01-03T20:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: SetViewpointCenterAsync not always centering on correct MapPoint</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/292652#M3439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have not been able to reproduce it based on the limited information you provided.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Are you using MapView or SceneView?&lt;/LI&gt;&lt;LI&gt;Which version are you using?&lt;/LI&gt;&lt;LI&gt;Is this WPF, UWP, iOS, Android?&lt;/LI&gt;&lt;LI&gt;What type of maps do you have? And are you zoomed to their scale limits?&lt;/LI&gt;&lt;LI&gt;What projection is you map using?&lt;/LI&gt;&lt;LI&gt;Do you have a simple app that reproduces the problem you can share?&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 21:34:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/292652#M3439</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2018-01-03T21:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: SetViewpointCenterAsync not always centering on correct MapPoint</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/292653#M3440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;MapView&lt;/LI&gt;&lt;LI&gt;100.1&lt;/LI&gt;&lt;LI&gt;WPF&lt;/LI&gt;&lt;LI&gt;I am using Raster and Vector Tile Layers, and&amp;nbsp;the scales are not out of range when the issue is occuring&lt;/LI&gt;&lt;LI&gt;WebMercator is the projection&lt;/LI&gt;&lt;LI&gt;I do not have a test application that can recreate the issue, but I can provide other notes below which may help:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this scenario, when I say I'm calling SetViewpointCenterAsync,&amp;nbsp;I am calling it from another method called CenterMapAsync.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;async Task&amp;lt;bool&amp;gt; CenterMapAsync(double latitude, double longitude)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//run other stuff...&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return await mapView.SetViewpointCenterAsync(new MapPoint(longitude, latitude, SpatialReferences.Wgs84),&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _mapView.MapScale);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I call CenterMapAsync from our test application it always works;&amp;nbsp;it is when it's being&amp;nbsp;used in our cilent application that it occasionally does not center (So I personally have never been able to recreate it. I have seen screenshots from when this happens when other people recreate it, and the logs when this occurs show that it's being called and &lt;SPAN&gt;SetViewpointCenterAsync is&amp;nbsp;&lt;/SPAN&gt;completing successfully).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 23:25:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/292653#M3440</guid>
      <dc:creator>WilliamLockwood</dc:creator>
      <dc:date>2018-01-03T23:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: SetViewpointCenterAsync not always centering on correct MapPoint</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/292654#M3441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Any chance you can try it with v100.2 ? There's been some fixes with respect to the navigation animations and cancellation.&lt;/P&gt;&lt;P&gt;If not, can you share some details about the PCs that are reproducing the issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Btw, this is how I tried to reproduce it using the tapped event:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void mapView_GeoViewTapped(object sender, Esri.ArcGISRuntime.UI.Controls.GeoViewInputEventArgs e)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var mp = GeometryEngine.Project(e.Location, SpatialReferences.Wgs84) as MapPoint;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapView.SetViewpointCenterAsync(mp, &lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;mapView.MapScale&lt;/SPAN&gt;);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it can't be reproduced in a simple app on the PC that sees the issue, it might be worth to start stripping away layers in your app till the problem goes away. It might give you a hint at what's causing it.&lt;/P&gt;&lt;P&gt;Also make sure you try and reproduce without the debugger attached. That could be a key difference between your setup and PCs where it gets recreated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 23:43:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/292654#M3441</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2018-01-03T23:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: SetViewpointCenterAsync not always centering on correct MapPoint</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/1103267#M10491</link>
      <description>&lt;P&gt;I'm seeing this in 100.11.2, specifically when I turn on the GPS tracking and turn it off. After that, if I have a feature at a certain X,Y and I do:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var vp = new Viewpoint(point, currentScale);
await MapView.SetViewpointAsync(vp);&lt;/LI-CODE&gt;&lt;P&gt;If I then put a marker at the centroid of the viewpoint, it is placed about 5 pixels up and 2-3 pixels to the right of the feature which I used to get the point in the code above. If I never turn the GPS tracking on and off, it gets placed correctly.&lt;/P&gt;&lt;P&gt;Correct placement:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChristopherPalmer99_0-1632946331079.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/24189iDD5B8D40C1C2BCF2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChristopherPalmer99_0-1632946331079.png" alt="ChristopherPalmer99_0-1632946331079.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After turning GPS tracking on, then off, then repeating the same operation:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChristopherPalmer99_2-1632946426415.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/24191iEB54B85CB01FFC4B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChristopherPalmer99_2-1632946426415.png" alt="ChristopherPalmer99_2-1632946426415.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, we never have the problem without turning the GPS tracking on and off.&lt;/P&gt;&lt;P&gt;Everything is projected to the spatial reference of the MapView itself. Seems to happen on all Xamarin Forms platforms.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 20:17:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/1103267#M10491</guid>
      <dc:creator>ChristopherPalmer99</dc:creator>
      <dc:date>2021-09-29T20:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: SetViewpointCenterAsync not always centering on correct MapPoint</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/1112399#M10603</link>
      <description>&lt;P&gt;We're still seeing this problem. Is there a way to file a ticket that can get this addressed?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 13:59:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/1112399#M10603</guid>
      <dc:creator>ChristopherPalmer99</dc:creator>
      <dc:date>2021-10-29T13:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: SetViewpointCenterAsync not always centering on correct MapPoint</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/1144116#M10762</link>
      <description>&lt;P&gt;The issue described above by&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/452710"&gt;@ChristopherPalmer99&lt;/a&gt;&amp;nbsp;is still happening with 100.13.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 16:12:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setviewpointcenterasync-not-always-centering-on/m-p/1144116#M10762</guid>
      <dc:creator>BranchHill</dc:creator>
      <dc:date>2022-02-15T16:12:52Z</dc:date>
    </item>
  </channel>
</rss>

