<?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 SetView/SetViewAsync not respecting MaximumExtent in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/setview-setviewasync-not-respecting-maximumextent/m-p/156597#M1772</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In 10.2.7, I'm having a problem when setting the view to a point outside the maximum extent of the map.&amp;nbsp;My map covers&amp;nbsp;{Envelope[XMin=-2500000, YMin=3500000.00000629, XMax=3045983.99999371, YMax=9045984, Wkid=25833]}. SetViewAsync where I&amp;nbsp;set center to&amp;nbsp;TargetGeometry = {MapPoint[X=63, Y=10, Wkid=4326]} (which is outside the maximum extent of the map), my map goes to a blank area. I can still zoom and pan, but I am never able to SetView to a point within my map later or zoom/pan to a location within the map without restarting the application.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried calculating the MaximumExtent for the map on LayerLoaded event, but this only restrict where the user can zoom or pan, but does not affect the SetView&amp;nbsp;methods. WrapAround is False.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a better way to prevent this issue than checking against Maximum extent&amp;nbsp;in all locations where I&amp;nbsp;do a SetView call?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adding a world map layer to my map, this issue no longer occurs, but we can't rely on the user having a world map available as a workaround for this issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Nov 2017 10:06:30 GMT</pubDate>
    <dc:creator>BjørnarSundsbø1</dc:creator>
    <dc:date>2017-11-29T10:06:30Z</dc:date>
    <item>
      <title>SetView/SetViewAsync not respecting MaximumExtent</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setview-setviewasync-not-respecting-maximumextent/m-p/156597#M1772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In 10.2.7, I'm having a problem when setting the view to a point outside the maximum extent of the map.&amp;nbsp;My map covers&amp;nbsp;{Envelope[XMin=-2500000, YMin=3500000.00000629, XMax=3045983.99999371, YMax=9045984, Wkid=25833]}. SetViewAsync where I&amp;nbsp;set center to&amp;nbsp;TargetGeometry = {MapPoint[X=63, Y=10, Wkid=4326]} (which is outside the maximum extent of the map), my map goes to a blank area. I can still zoom and pan, but I am never able to SetView to a point within my map later or zoom/pan to a location within the map without restarting the application.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried calculating the MaximumExtent for the map on LayerLoaded event, but this only restrict where the user can zoom or pan, but does not affect the SetView&amp;nbsp;methods. WrapAround is False.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a better way to prevent this issue than checking against Maximum extent&amp;nbsp;in all locations where I&amp;nbsp;do a SetView call?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adding a world map layer to my map, this issue no longer occurs, but we can't rely on the user having a world map available as a workaround for this issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 10:06:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setview-setviewasync-not-respecting-maximumextent/m-p/156597#M1772</guid>
      <dc:creator>BjørnarSundsbø1</dc:creator>
      <dc:date>2017-11-29T10:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: SetView/SetViewAsync not respecting MaximumExtent</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setview-setviewasync-not-respecting-maximumextent/m-p/156598#M1773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Dec 2017 15:25:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setview-setviewasync-not-respecting-maximumextent/m-p/156598#M1773</guid>
      <dc:creator>BjørnarSundsbø1</dc:creator>
      <dc:date>2017-12-04T15:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: SetView/SetViewAsync not respecting MaximumExtent</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setview-setviewasync-not-respecting-maximumextent/m-p/156599#M1774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use NavigationCompleted event and GeometryEngine to check if the current extent is still within MaximumExtent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this? Any of the SetView calls will raise NavigationCompleted and you can do checks then.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Envelope lastExtent &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
MyMapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;NavigationCompleted &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;s&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; e&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;MyMapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MaximumExtent &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;||&lt;/SPAN&gt; GeometryEngine&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Within&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;MyMapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Extent&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; MyMapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MaximumExtent&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;||&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lastExtent&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;IsEqual&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;MyMapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Extent&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lastExtent &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; MyMapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Extent&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyMapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;SetViewAsync&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Viewpoint&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;GeometryEngine&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Intersection&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;MyMapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Extent&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; MyMapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MaximumExtent&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:18:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setview-setviewasync-not-respecting-maximumextent/m-p/156599#M1774</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T08:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: SetView/SetViewAsync not respecting MaximumExtent</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setview-setviewasync-not-respecting-maximumextent/m-p/156600#M1775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I ended up doing a GeometryEngine.Project(viewpoint..TargetGeometry, MapView.SpatialReference). If the result s an empty geometry, I abort the operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Never really understood the difference between&amp;nbsp;NavigationCompleted vs ExtentChanged event. Documentation is not very precise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2017 12:05:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setview-setviewasync-not-respecting-maximumextent/m-p/156600#M1775</guid>
      <dc:creator>BjørnarSundsbø1</dc:creator>
      <dc:date>2017-12-14T12:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: SetView/SetViewAsync not respecting MaximumExtent</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setview-setviewasync-not-respecting-maximumextent/m-p/156601#M1776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure when this was fixed, but&amp;nbsp;the error doesn't occur in 100.4. Probably resolved earlier.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2018 22:09:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setview-setviewasync-not-respecting-maximumextent/m-p/156601#M1776</guid>
      <dc:creator>BjørnarSundsbø1</dc:creator>
      <dc:date>2018-12-14T22:09:12Z</dc:date>
    </item>
  </channel>
</rss>

