<?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: Can I set the InitialialViewpoint and a padding at the same time in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/can-i-set-the-initialialviewpoint-and-a-padding-at/m-p/1242150#M11560</link>
    <description>&lt;P&gt;Have you tried setting the ViewInsets on the view?&lt;BR /&gt;MyMapView.ViewInsets = new Thickness(50);&lt;/P&gt;&lt;P&gt;This sets up a more "permanent" padding for all zoom operations (it's usually used for when you for instance have a side panel open, and you want to add some padding on just one side where the panel is, so the center of the map is pushed a little over and any zooms would take that left padding into account).&lt;BR /&gt;&lt;BR /&gt;You can always reset the insets after the mapview has loaded back to zero.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/net/api-reference/api/netwin/wpf/Esri.ArcGISRuntime.UI.Controls.GeoView.ViewInsets.html" target="_blank"&gt;https://developers.arcgis.com/net/api-reference/api/netwin/wpf/Esri.ArcGISRuntime.UI.Controls.GeoView.ViewInsets.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Dec 2022 21:09:03 GMT</pubDate>
    <dc:creator>dotMorten_esri</dc:creator>
    <dc:date>2022-12-16T21:09:03Z</dc:date>
    <item>
      <title>Can I set the InitialialViewpoint and a padding at the same time</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/can-i-set-the-initialialviewpoint-and-a-padding-at/m-p/1241888#M11559</link>
      <description>&lt;P&gt;Platform = Xamarin Forms, Language = C#&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wish to open a MapView to contain two points plus some padding for the convenience of the user.&lt;/P&gt;&lt;P&gt;Currently I do something like&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Geometry geometry = new PolyLine() { mapPoint1, mapPoint2 };

MapView map = .....;

map.InitalViewPoint = new Viewpoint(geometry);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;This opens the mapview to right place but puts my two points right on the edge. I would like some padding like I can get with&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;await map.SetViewpointGeometryAsync(geometry, 30);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem with using&amp;nbsp;SetViewpointGeometryAsync is the map will display at the choosen InitialViewPoint then move to the new ViewPoint. If I don't set the InitialViewPoint it just uses the default initial location from the map I am using.&lt;BR /&gt;This is a jarring experience for the user where they see one map then it moves to another location which is what they are really interested in.&lt;BR /&gt;Is there anyway I can get rid of this two step scroll and also get padding at the time time.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 06:30:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/can-i-set-the-initialialviewpoint-and-a-padding-at/m-p/1241888#M11559</guid>
      <dc:creator>SquarecodeDeveloper</dc:creator>
      <dc:date>2022-12-16T06:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can I set the InitialialViewpoint and a padding at the same time</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/can-i-set-the-initialialviewpoint-and-a-padding-at/m-p/1242150#M11560</link>
      <description>&lt;P&gt;Have you tried setting the ViewInsets on the view?&lt;BR /&gt;MyMapView.ViewInsets = new Thickness(50);&lt;/P&gt;&lt;P&gt;This sets up a more "permanent" padding for all zoom operations (it's usually used for when you for instance have a side panel open, and you want to add some padding on just one side where the panel is, so the center of the map is pushed a little over and any zooms would take that left padding into account).&lt;BR /&gt;&lt;BR /&gt;You can always reset the insets after the mapview has loaded back to zero.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/net/api-reference/api/netwin/wpf/Esri.ArcGISRuntime.UI.Controls.GeoView.ViewInsets.html" target="_blank"&gt;https://developers.arcgis.com/net/api-reference/api/netwin/wpf/Esri.ArcGISRuntime.UI.Controls.GeoView.ViewInsets.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 21:09:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/can-i-set-the-initialialviewpoint-and-a-padding-at/m-p/1242150#M11560</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2022-12-16T21:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Can I set the InitialialViewpoint and a padding at the same time</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/can-i-set-the-initialialviewpoint-and-a-padding-at/m-p/1242259#M11561</link>
      <description>&lt;P&gt;Worked a treat, thanks very much&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 02:49:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/can-i-set-the-initialialviewpoint-and-a-padding-at/m-p/1242259#M11561</guid>
      <dc:creator>SquarecodeDeveloper</dc:creator>
      <dc:date>2022-12-19T02:49:09Z</dc:date>
    </item>
  </channel>
</rss>

