<?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: MapView.Active.ZoomTo() does not work for a created layer in ArcGIS Pro SDK in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/mapview-active-zoomto-does-not-work-for-a-created/m-p/1025716#M6164</link>
    <description>&lt;P&gt;interestingly it works when I create another QueuedTask and move ZoomTo in it&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;QueuedTask.Run(() =&amp;gt;{...});
QueuedTask.Run(() =&amp;gt;
{
   MapView.Active.ZoomTo(currentExtGeo);
});&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 11 Feb 2021 03:29:50 GMT</pubDate>
    <dc:creator>Amadeus111</dc:creator>
    <dc:date>2021-02-11T03:29:50Z</dc:date>
    <item>
      <title>MapView.Active.ZoomTo() does not work for a created layer in ArcGIS Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/mapview-active-zoomto-does-not-work-for-a-created/m-p/1025585#M6163</link>
      <description>&lt;P&gt;I generate a geometry from a current view extent and create a layer via LayerFactory. Then, I select features in the that intersects&amp;nbsp; with the created the geometry.&amp;nbsp;&lt;/P&gt;&lt;P&gt;AGP zoom out all the way the layer extent and does not zoom back into the geometry extent. It happens only right after creating the layer. Afterwards, it works fine when layer does not need to be created again.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OguzSariyildiz_0-1612991167923.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/5774iC2F846BD009F3618/image-size/medium?v=v2&amp;amp;px=400" role="button" title="OguzSariyildiz_0-1612991167923.png" alt="OguzSariyildiz_0-1612991167923.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is the code&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;QueuedTask.Run(() =&amp;gt;
{
   Envelope currentExtent = MapView.Active.Extent;
   Geometry currentExtGeo = currentExtent.Clone();
   var sq = new SpatialQueryFilter() { FilterGeometry = currentExtGeo, 
               SpatialRelationship = SpatialRelationship.Intersects };
                            

   CalledFlayer = LayerFactory.Instance.CreateLayer(CalledUri, 
                  MapView.Active.Map, 0, CalledFLayerName) as FeatureLayer;
   CalledFlayer.ClearSelection();
   CalledFlayer.SetVisibility(true);

   CalledFlayer.Select(sq);
   MapView.Active.ZoomTo(currentExtGeo);//Supposed go back into original 
                                        //extent here but no
     
});&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 10 Feb 2021 21:11:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/mapview-active-zoomto-does-not-work-for-a-created/m-p/1025585#M6163</guid>
      <dc:creator>Amadeus111</dc:creator>
      <dc:date>2021-02-10T21:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: MapView.Active.ZoomTo() does not work for a created layer in ArcGIS Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/mapview-active-zoomto-does-not-work-for-a-created/m-p/1025716#M6164</link>
      <description>&lt;P&gt;interestingly it works when I create another QueuedTask and move ZoomTo in it&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;QueuedTask.Run(() =&amp;gt;{...});
QueuedTask.Run(() =&amp;gt;
{
   MapView.Active.ZoomTo(currentExtGeo);
});&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 11 Feb 2021 03:29:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/mapview-active-zoomto-does-not-work-for-a-created/m-p/1025716#M6164</guid>
      <dc:creator>Amadeus111</dc:creator>
      <dc:date>2021-02-11T03:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: MapView.Active.ZoomTo() does not work for a created layer in ArcGIS Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/mapview-active-zoomto-does-not-work-for-a-created/m-p/1025731#M6166</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have had the same situation but not with zoom. Esri stuff recommended to divide process inside QueuedTask.Run. I have a mind what it is a cache problem. Now if something does not work I try to divide one QueuedTask.Run to few if it possible.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 06:18:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/mapview-active-zoomto-does-not-work-for-a-created/m-p/1025731#M6166</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2021-02-11T06:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: MapView.Active.ZoomTo() does not work for a created layer in ArcGIS Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/mapview-active-zoomto-does-not-work-for-a-created/m-p/1025838#M6168</link>
      <description>&lt;P&gt;Good to know!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 14:22:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/mapview-active-zoomto-does-not-work-for-a-created/m-p/1025838#M6168</guid>
      <dc:creator>Amadeus111</dc:creator>
      <dc:date>2021-02-11T14:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: MapView.Active.ZoomTo() does not work for a created layer in ArcGIS Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/mapview-active-zoomto-does-not-work-for-a-created/m-p/1326084#M10334</link>
      <description>&lt;P&gt;I had a similar problem with the setCamera and isVisible methods when I was changing these properties on a large number of layers. The map frame display did not reliably update. Breaking out the calls into separate&amp;nbsp;&lt;SPAN&gt;QueuedTask.Run blocks seemed to fix the issue, although it seems less efficient.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 18:49:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/mapview-active-zoomto-does-not-work-for-a-created/m-p/1326084#M10334</guid>
      <dc:creator>LesleyBross1</dc:creator>
      <dc:date>2023-09-06T18:49:07Z</dc:date>
    </item>
  </channel>
</rss>

