<?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 Zoom on layer from a .GPKG not working when using CreateLayer in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/zoom-on-layer-from-a-gpkg-not-working-when-using/m-p/1414889#M11425</link>
    <description>&lt;P&gt;HI,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using ArgGis Pro 3.2.2 and my data is in a .gpkg file.&lt;/P&gt;&lt;P&gt;Zooming on the layer works when I add it from manualy(drag and drop form Catalog).&lt;/P&gt;&lt;P&gt;If I do it in my c# code using the CreateLayer, it doesn't work.&lt;/P&gt;&lt;P&gt;EX:&lt;/P&gt;&lt;P&gt;LayerFactory.Instance.CreateLayer(new Uri("C:\Temp\data.gpkg\Name"), map, map.Layers.Count, "name");&lt;/P&gt;&lt;P&gt;Tommy&lt;/P&gt;</description>
    <pubDate>Wed, 24 Apr 2024 17:41:09 GMT</pubDate>
    <dc:creator>TommyBouchard</dc:creator>
    <dc:date>2024-04-24T17:41:09Z</dc:date>
    <item>
      <title>Zoom on layer from a .GPKG not working when using CreateLayer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/zoom-on-layer-from-a-gpkg-not-working-when-using/m-p/1414889#M11425</link>
      <description>&lt;P&gt;HI,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using ArgGis Pro 3.2.2 and my data is in a .gpkg file.&lt;/P&gt;&lt;P&gt;Zooming on the layer works when I add it from manualy(drag and drop form Catalog).&lt;/P&gt;&lt;P&gt;If I do it in my c# code using the CreateLayer, it doesn't work.&lt;/P&gt;&lt;P&gt;EX:&lt;/P&gt;&lt;P&gt;LayerFactory.Instance.CreateLayer(new Uri("C:\Temp\data.gpkg\Name"), map, map.Layers.Count, "name");&lt;/P&gt;&lt;P&gt;Tommy&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 17:41:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/zoom-on-layer-from-a-gpkg-not-working-when-using/m-p/1414889#M11425</guid>
      <dc:creator>TommyBouchard</dc:creator>
      <dc:date>2024-04-24T17:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom on layer from a .GPKG not working when using CreateLayer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/zoom-on-layer-from-a-gpkg-not-working-when-using/m-p/1415193#M11426</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You need to call&amp;nbsp;MapView.Active.ZoomToAsync after creating layer:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var layer = LayerFactory.Instance.CreateLayer(newUri("C:\Temp\data.gpkg\Name"), map, map.Layers.Count, "name");
var fc = (layer as FeatureLayer).GetFeatureClass();
zoomToEnv = fc.GetExtent().Clone() as ArcGIS.Core.Geometry.Envelope;
if (zoomToEnv != null) MapView.Active.ZoomToAsync(zoomToEnv);&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 25 Apr 2024 09:16:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/zoom-on-layer-from-a-gpkg-not-working-when-using/m-p/1415193#M11426</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2024-04-25T09:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom on layer from a .GPKG not working when using CreateLayer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/zoom-on-layer-from-a-gpkg-not-working-when-using/m-p/1415359#M11431</link>
      <description>&lt;P&gt;Thanks, I can use this to bypass my problem temporarily.&lt;/P&gt;&lt;P&gt;Outside of the c# code, in arcgis pro, if I right click on the layer and click on Zoom on the layer, it doesn't work.&lt;/P&gt;&lt;P&gt;It does a weird zoom out not centered on my polygons.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 15:31:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/zoom-on-layer-from-a-gpkg-not-working-when-using/m-p/1415359#M11431</guid>
      <dc:creator>TommyBouchard</dc:creator>
      <dc:date>2024-04-25T15:31:27Z</dc:date>
    </item>
  </channel>
</rss>

