<?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: Shapefile feature layers does not always show up on the map in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/shapefile-feature-layers-does-not-always-show-up/m-p/1254705#M11648</link>
    <description>&lt;P&gt;Just curious, if there is a reason for loading MyMapView.Map.LoadAsync() in the loop?&lt;/P&gt;&lt;P&gt;Can you try removing `MyMapView.Map.LoadAsync()` from the loop. If loading the map is needed, I suggest either do it before or after the for loop.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2023 00:55:16 GMT</pubDate>
    <dc:creator>PreetiMaske</dc:creator>
    <dc:date>2023-02-03T00:55:16Z</dc:date>
    <item>
      <title>Shapefile feature layers does not always show up on the map</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/shapefile-feature-layers-does-not-always-show-up/m-p/1254640#M11645</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Sometimes my shapefile layers is not shown on the map when i run my method below.&lt;BR /&gt;The first row with the Delay solves the problem. But is there another way to do it? Because i dont want to do the delay.&lt;/P&gt;&lt;PRE&gt;public async Task drawShapeFileAsync()
{
	await Task.Delay(2000);

	ArrayList shpFiles = layersSingleton.getShpLayers();
	
	for (int i = 0; i &amp;lt; shpFiles.Count; i++)
	{
		ShpLayer shpLayer = (ShpLayer)shpFiles[i];
		string filepath = workingDirectory + "\\\\" + shpLayer.fileName;

		ShapefileFeatureTable shapefileFeatureTable = await ShapefileFeatureTable.OpenAsync(filepath);
		FeatureLayer featureLayer = new FeatureLayer(shapefileFeatureTable);

		featureLayer.RenderingMode = FeatureRenderingMode.Dynamic;
		await MyMapView.Map.LoadAsync();
		MyMapView.Map.OperationalLayers.Add(featureLayer);    
	}
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any input would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks, Mattias&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 21:56:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/shapefile-feature-layers-does-not-always-show-up/m-p/1254640#M11645</guid>
      <dc:creator>MattiasWesterberg</dc:creator>
      <dc:date>2023-02-02T21:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Shapefile feature layers does not always show up on the map</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/shapefile-feature-layers-does-not-always-show-up/m-p/1254705#M11648</link>
      <description>&lt;P&gt;Just curious, if there is a reason for loading MyMapView.Map.LoadAsync() in the loop?&lt;/P&gt;&lt;P&gt;Can you try removing `MyMapView.Map.LoadAsync()` from the loop. If loading the map is needed, I suggest either do it before or after the for loop.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 00:55:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/shapefile-feature-layers-does-not-always-show-up/m-p/1254705#M11648</guid>
      <dc:creator>PreetiMaske</dc:creator>
      <dc:date>2023-02-03T00:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Shapefile feature layers does not always show up on the map</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/shapefile-feature-layers-does-not-always-show-up/m-p/1254759#M11652</link>
      <description>&lt;P&gt;No there was no reason for that.&lt;/P&gt;&lt;P&gt;I have now tried to move MyMapView.Map.LoadAsync() to both before and after the loop.&lt;/P&gt;&lt;P&gt;When i have it before the loop it works, but only if i still have the Delay. So it did not solve my problem.&lt;/P&gt;&lt;P&gt;Thanks for the suggestion.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 08:30:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/shapefile-feature-layers-does-not-always-show-up/m-p/1254759#M11652</guid>
      <dc:creator>MattiasWesterberg</dc:creator>
      <dc:date>2023-02-03T08:30:13Z</dc:date>
    </item>
  </channel>
</rss>

