<?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: Display a layers from .mpk file generated from a feature class in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/display-a-layers-from-mpk-file-generated-from-a/m-p/377767#M4461</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nagma yasmin ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's is my code that i've done :&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;using System;&lt;BR /&gt;using System.Collections.Generic;&lt;BR /&gt;using System.ComponentModel;&lt;BR /&gt;using System.Linq;&lt;BR /&gt;using System.Text;&lt;BR /&gt;using System.Threading.Tasks;&lt;BR /&gt;using System.Runtime.CompilerServices;&lt;BR /&gt;using Esri.ArcGISRuntime.Data;&lt;BR /&gt;using Esri.ArcGISRuntime.Geometry;&lt;BR /&gt;using Esri.ArcGISRuntime.Location;&lt;BR /&gt;using Esri.ArcGISRuntime.Mapping;&lt;BR /&gt;using Esri.ArcGISRuntime.Security;&lt;BR /&gt;using Esri.ArcGISRuntime.Symbology;&lt;BR /&gt;using Esri.ArcGISRuntime.Tasks;&lt;BR /&gt;using Esri.ArcGISRuntime.UI;&lt;/P&gt;&lt;P&gt;namespace RecuperCommune&lt;BR /&gt;{&lt;BR /&gt; /// &amp;lt;summary&amp;gt;&lt;BR /&gt; /// Provides map data to an application&lt;BR /&gt; /// &amp;lt;/summary&amp;gt;&lt;BR /&gt; public class MapViewModel : INotifyPropertyChanged&lt;BR /&gt; {&lt;BR /&gt; public MapViewModel()&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;private Map _map = new Map();&lt;/P&gt;&lt;P&gt;/// &amp;lt;summary&amp;gt;&lt;BR /&gt; /// Gets or sets the map&lt;BR /&gt; /// &amp;lt;/summary&amp;gt;&lt;BR /&gt; public Map Map&lt;BR /&gt; {&lt;BR /&gt; get { return _map; }&lt;BR /&gt; set { _map = value; OnPropertyChanged(); }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;/// &amp;lt;summary&amp;gt;&lt;BR /&gt; /// Raises the &amp;lt;see cref="MapViewModel.PropertyChanged" /&amp;gt; event&lt;BR /&gt; /// &amp;lt;/summary&amp;gt;&lt;BR /&gt; /// &amp;lt;param name="propertyName"&amp;gt;The name of the property that has changed&amp;lt;/param&amp;gt;&lt;BR /&gt; protected void OnPropertyChanged([CallerMemberName] string propertyName = null)&lt;BR /&gt; {&lt;BR /&gt; var propertyChangedHandler = PropertyChanged;&lt;BR /&gt; if (propertyChangedHandler != null)&lt;BR /&gt; propertyChangedHandler(this, new PropertyChangedEventArgs(propertyName));&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;public event PropertyChangedEventHandler PropertyChanged;&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using Esri.ArcGISRuntime.LocalServices;&lt;BR /&gt;using Esri.ArcGISRuntime.Mapping;&lt;BR /&gt;using Esri.ArcGISRuntime.UI;&lt;BR /&gt;using System;&lt;BR /&gt;using System.Collections.Generic;&lt;BR /&gt;using System.Linq;&lt;BR /&gt;using System.Text;&lt;BR /&gt;using System.Threading.Tasks;&lt;BR /&gt;using System.Windows;&lt;BR /&gt;using System.Windows.Controls;&lt;BR /&gt;using System.Windows.Data;&lt;BR /&gt;using System.Windows.Documents;&lt;BR /&gt;using System.Windows.Input;&lt;BR /&gt;using System.Windows.Media;&lt;BR /&gt;using System.Windows.Media.Imaging;&lt;BR /&gt;using System.Windows.Navigation;&lt;BR /&gt;using System.Windows.Shapes;&lt;/P&gt;&lt;P&gt;namespace RecuperCommune&lt;BR /&gt;{&lt;BR /&gt; /// &amp;lt;summary&amp;gt;&lt;BR /&gt; /// Interaction logic for MainWindow.xaml&lt;BR /&gt; /// &amp;lt;/summary&amp;gt;&lt;BR /&gt; public partial class MainWindow : Window&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; {&lt;BR /&gt; private MapViewModel _mapViewModel ;&lt;BR /&gt; public MainWindow()&lt;BR /&gt; {&lt;BR /&gt; InitializeComponent();&lt;BR /&gt; _mapViewModel = this.FindResource("MapViewModel") as MapViewModel;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private Esri.ArcGISRuntime.LocalServices.LocalServer _localServer;&lt;/P&gt;&lt;P&gt;private async void StartLocalServer()&lt;BR /&gt; {&lt;BR /&gt; //get the singleton LocalServer object using the static instance property&lt;BR /&gt; _localServer = Esri.ArcGISRuntime.LocalServices.LocalServer.Instance;&lt;/P&gt;&lt;P&gt;//Handle the statusChanged event to react when the server is started&lt;/P&gt;&lt;P&gt;_localServer.StatusChanged += ServerStatusChanged;&lt;/P&gt;&lt;P&gt;//Start the local server instance&lt;/P&gt;&lt;P&gt;await _localServer.StartAsync();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;private async void ServerStatusChanged(object sender, Esri.ArcGISRuntime.LocalServices.StatusChangedEventArgs e)&lt;BR /&gt; {&lt;BR /&gt; // Check if the server started successfully&lt;BR /&gt; if (e.Status == Esri.ArcGISRuntime.LocalServices.LocalServerStatus.Started)&lt;BR /&gt; {&lt;BR /&gt; var mapService = new LocalMapService(@"C:\Users\mkeddar\Documents\ArcGIS\niveauDepartemental.mpk");&lt;BR /&gt; mapService.StatusChanged += (svc, args) =&amp;gt;&lt;BR /&gt; {&lt;BR /&gt; //si a demaré correctement &lt;BR /&gt; if (args.Status == LocalServerStatus.Started)&lt;BR /&gt; {&lt;BR /&gt; var mapServiceUrl = (svc as LocalMapService).Url;&lt;BR /&gt; //Create a new ArcGISMapImageLayer&lt;BR /&gt; ArcGISMapImageLayer localServiceLayer = new Esri.ArcGISRuntime.Mapping.ArcGISMapImageLayer(mapServiceUrl);&lt;BR /&gt; //set layer opacity to semi-transparent&lt;BR /&gt; localServiceLayer.Opacity = 0.5;&lt;BR /&gt; //add the layer to the map&lt;BR /&gt; _mapViewModel.Map.OperationalLayers.Add(localServiceLayer);&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;//start the local map service&lt;/P&gt;&lt;P&gt;await mapService.StartAsync();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; // Map initialization logic is contained in MapViewModel.cs&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;And my code doesn't do any thing &amp;nbsp;, actually i have to display the France departements as layers &amp;nbsp;, i have joind a picture of my layers that is supposed to be displayed&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/360384_pastedImage_5.png" style="width: 620px; height: 199px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but my code doesn't show any thing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advanced&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Jul 2017 08:57:19 GMT</pubDate>
    <dc:creator>ManelKEDDAR</dc:creator>
    <dc:date>2017-07-07T08:57:19Z</dc:date>
    <item>
      <title>Display a layers from .mpk file generated from a feature class</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/display-a-layers-from-mpk-file-generated-from-a/m-p/377765#M4459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello every one ;&lt;/P&gt;&lt;P&gt;I have a feature class named departementalLevel , that contains layers , i need to display these layers using on a map suing arcGis runtime version 100.1 , so i generated a .mpk file from my feature class and now i need to display these layers from this mpk file , can i do this task ? and how i can do it &amp;nbsp;need a sample code please that explains&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advanced&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jul 2017 13:08:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/display-a-layers-from-mpk-file-generated-from-a/m-p/377765#M4459</guid>
      <dc:creator>ManelKEDDAR</dc:creator>
      <dc:date>2017-07-06T13:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Display a layers from .mpk file generated from a feature class</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/display-a-layers-from-mpk-file-generated-from-a/m-p/377766#M4460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manel,&lt;/P&gt;&lt;P&gt;To add a mpk layer on the map, you could use&amp;nbsp;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;ArcGISMapImageLayer. The service uri for this layer will be available once you start the &lt;STRONG&gt;LocalMapService&lt;/STRONG&gt;. Please look at the link below :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Local Server --&amp;gt; Run map image layer services&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/net/latest/wpf/guide/local-server.htm" title="https://developers.arcgis.com/net/latest/wpf/guide/local-server.htm"&gt;Local Server—ArcGIS Runtime SDK for .NET (WPF) | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nagma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jul 2017 15:57:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/display-a-layers-from-mpk-file-generated-from-a/m-p/377766#M4460</guid>
      <dc:creator>NagmaYasmin</dc:creator>
      <dc:date>2017-07-06T15:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Display a layers from .mpk file generated from a feature class</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/display-a-layers-from-mpk-file-generated-from-a/m-p/377767#M4461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nagma yasmin ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's is my code that i've done :&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;using System;&lt;BR /&gt;using System.Collections.Generic;&lt;BR /&gt;using System.ComponentModel;&lt;BR /&gt;using System.Linq;&lt;BR /&gt;using System.Text;&lt;BR /&gt;using System.Threading.Tasks;&lt;BR /&gt;using System.Runtime.CompilerServices;&lt;BR /&gt;using Esri.ArcGISRuntime.Data;&lt;BR /&gt;using Esri.ArcGISRuntime.Geometry;&lt;BR /&gt;using Esri.ArcGISRuntime.Location;&lt;BR /&gt;using Esri.ArcGISRuntime.Mapping;&lt;BR /&gt;using Esri.ArcGISRuntime.Security;&lt;BR /&gt;using Esri.ArcGISRuntime.Symbology;&lt;BR /&gt;using Esri.ArcGISRuntime.Tasks;&lt;BR /&gt;using Esri.ArcGISRuntime.UI;&lt;/P&gt;&lt;P&gt;namespace RecuperCommune&lt;BR /&gt;{&lt;BR /&gt; /// &amp;lt;summary&amp;gt;&lt;BR /&gt; /// Provides map data to an application&lt;BR /&gt; /// &amp;lt;/summary&amp;gt;&lt;BR /&gt; public class MapViewModel : INotifyPropertyChanged&lt;BR /&gt; {&lt;BR /&gt; public MapViewModel()&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;private Map _map = new Map();&lt;/P&gt;&lt;P&gt;/// &amp;lt;summary&amp;gt;&lt;BR /&gt; /// Gets or sets the map&lt;BR /&gt; /// &amp;lt;/summary&amp;gt;&lt;BR /&gt; public Map Map&lt;BR /&gt; {&lt;BR /&gt; get { return _map; }&lt;BR /&gt; set { _map = value; OnPropertyChanged(); }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;/// &amp;lt;summary&amp;gt;&lt;BR /&gt; /// Raises the &amp;lt;see cref="MapViewModel.PropertyChanged" /&amp;gt; event&lt;BR /&gt; /// &amp;lt;/summary&amp;gt;&lt;BR /&gt; /// &amp;lt;param name="propertyName"&amp;gt;The name of the property that has changed&amp;lt;/param&amp;gt;&lt;BR /&gt; protected void OnPropertyChanged([CallerMemberName] string propertyName = null)&lt;BR /&gt; {&lt;BR /&gt; var propertyChangedHandler = PropertyChanged;&lt;BR /&gt; if (propertyChangedHandler != null)&lt;BR /&gt; propertyChangedHandler(this, new PropertyChangedEventArgs(propertyName));&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;public event PropertyChangedEventHandler PropertyChanged;&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using Esri.ArcGISRuntime.LocalServices;&lt;BR /&gt;using Esri.ArcGISRuntime.Mapping;&lt;BR /&gt;using Esri.ArcGISRuntime.UI;&lt;BR /&gt;using System;&lt;BR /&gt;using System.Collections.Generic;&lt;BR /&gt;using System.Linq;&lt;BR /&gt;using System.Text;&lt;BR /&gt;using System.Threading.Tasks;&lt;BR /&gt;using System.Windows;&lt;BR /&gt;using System.Windows.Controls;&lt;BR /&gt;using System.Windows.Data;&lt;BR /&gt;using System.Windows.Documents;&lt;BR /&gt;using System.Windows.Input;&lt;BR /&gt;using System.Windows.Media;&lt;BR /&gt;using System.Windows.Media.Imaging;&lt;BR /&gt;using System.Windows.Navigation;&lt;BR /&gt;using System.Windows.Shapes;&lt;/P&gt;&lt;P&gt;namespace RecuperCommune&lt;BR /&gt;{&lt;BR /&gt; /// &amp;lt;summary&amp;gt;&lt;BR /&gt; /// Interaction logic for MainWindow.xaml&lt;BR /&gt; /// &amp;lt;/summary&amp;gt;&lt;BR /&gt; public partial class MainWindow : Window&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; {&lt;BR /&gt; private MapViewModel _mapViewModel ;&lt;BR /&gt; public MainWindow()&lt;BR /&gt; {&lt;BR /&gt; InitializeComponent();&lt;BR /&gt; _mapViewModel = this.FindResource("MapViewModel") as MapViewModel;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private Esri.ArcGISRuntime.LocalServices.LocalServer _localServer;&lt;/P&gt;&lt;P&gt;private async void StartLocalServer()&lt;BR /&gt; {&lt;BR /&gt; //get the singleton LocalServer object using the static instance property&lt;BR /&gt; _localServer = Esri.ArcGISRuntime.LocalServices.LocalServer.Instance;&lt;/P&gt;&lt;P&gt;//Handle the statusChanged event to react when the server is started&lt;/P&gt;&lt;P&gt;_localServer.StatusChanged += ServerStatusChanged;&lt;/P&gt;&lt;P&gt;//Start the local server instance&lt;/P&gt;&lt;P&gt;await _localServer.StartAsync();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;private async void ServerStatusChanged(object sender, Esri.ArcGISRuntime.LocalServices.StatusChangedEventArgs e)&lt;BR /&gt; {&lt;BR /&gt; // Check if the server started successfully&lt;BR /&gt; if (e.Status == Esri.ArcGISRuntime.LocalServices.LocalServerStatus.Started)&lt;BR /&gt; {&lt;BR /&gt; var mapService = new LocalMapService(@"C:\Users\mkeddar\Documents\ArcGIS\niveauDepartemental.mpk");&lt;BR /&gt; mapService.StatusChanged += (svc, args) =&amp;gt;&lt;BR /&gt; {&lt;BR /&gt; //si a demaré correctement &lt;BR /&gt; if (args.Status == LocalServerStatus.Started)&lt;BR /&gt; {&lt;BR /&gt; var mapServiceUrl = (svc as LocalMapService).Url;&lt;BR /&gt; //Create a new ArcGISMapImageLayer&lt;BR /&gt; ArcGISMapImageLayer localServiceLayer = new Esri.ArcGISRuntime.Mapping.ArcGISMapImageLayer(mapServiceUrl);&lt;BR /&gt; //set layer opacity to semi-transparent&lt;BR /&gt; localServiceLayer.Opacity = 0.5;&lt;BR /&gt; //add the layer to the map&lt;BR /&gt; _mapViewModel.Map.OperationalLayers.Add(localServiceLayer);&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;//start the local map service&lt;/P&gt;&lt;P&gt;await mapService.StartAsync();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; // Map initialization logic is contained in MapViewModel.cs&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;And my code doesn't do any thing &amp;nbsp;, actually i have to display the France departements as layers &amp;nbsp;, i have joind a picture of my layers that is supposed to be displayed&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/360384_pastedImage_5.png" style="width: 620px; height: 199px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but my code doesn't show any thing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advanced&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2017 08:57:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/display-a-layers-from-mpk-file-generated-from-a/m-p/377767#M4461</guid>
      <dc:creator>ManelKEDDAR</dc:creator>
      <dc:date>2017-07-07T08:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Display a layers from .mpk file generated from a feature class</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/display-a-layers-from-mpk-file-generated-from-a/m-p/377768#M4462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a few ways you can troubleshoot a layer that is not loading. One of them is using LayerViewStateChanged. For ArcGISMapImageLayer, you can check sublayer load errors this way.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;public&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;MainWindow&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;&amp;nbsp;&amp;nbsp; &lt;SPAN class="token function"&gt;InitializeComponent&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;&amp;nbsp;&amp;nbsp; MyMapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;LayerViewStateChanged &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; MyMapView_LayerViewStateChanged&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; MyMapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Map &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Map&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Basemap&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreateTopographic&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;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;private&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;async&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;MyMapView_LayerViewStateChanged&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;object&lt;/SPAN&gt; sender&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; LayerViewStateChangedEventArgs e&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; error &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; e&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;LayerViewState&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Error &lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt; e&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;LoadError&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&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;error &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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Show&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;error&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Message&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&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;e&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Layer &lt;SPAN class="keyword token"&gt;is&lt;/SPAN&gt; ArcGISMapImageLayer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; layer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ArcGISMapImageLayer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;e&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Layer&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;foreach&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; sublayer &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Sublayers&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;await&lt;/SPAN&gt; sublayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;LoadAsync&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;catch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Exception ex&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;&amp;nbsp;&amp;nbsp; MessageBox&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Show&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ex&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Message&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; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&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;/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;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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it were a rendering issue, you can supply a different renderer provided it matches the geometry type of your service. In snippet below, I only wanted to display the line geometry so I cleared the rest of the sublayers.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; layer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ArcGISMapImageLayer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; MyMapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;OperationalLayers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;FirstOrDefault&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;
layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Sublayers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Clear&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;
layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Sublayers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&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;ArcGISMapImageSublayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&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; Renderer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;SimpleRenderer&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; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Symbol &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;SimpleLineSymbol&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;SimpleLineSymbolStyle&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DashDotDot&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Colors&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Blue&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;&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;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You can enable debugging from your ArcGIS Runtime Local Server Utility and use Fiddler or any web debugging tool.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/360632_debugging.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;When using ArcGISMapImageLayer from a LocalServer, one of the requests should look like this which returns you an image. You should see the same image rendered in your runtime map.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/360633_imagerequest.JPG" style="width: 620px; height: 397px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:26:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/display-a-layers-from-mpk-file-generated-from-a/m-p/377768#M4462</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T17:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Display a layers from .mpk file generated from a feature class</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/display-a-layers-from-mpk-file-generated-from-a/m-p/377769#M4463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manel,&lt;/P&gt;&lt;P&gt;I have created a small application that starts the Local Server and add a mpk as an &lt;STRONG&gt;ArcGISMapImageLayer&lt;/STRONG&gt;.&amp;nbsp;It is pretty straight forward. Attached is the screen shot and project file. The mpk is located under the "bin\MPK" folder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nagma&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="360796" alt="LocalServer" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/360796_LocalServerTest.PNG" style="width: 620px; height: 322px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jul 2017 20:44:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/display-a-layers-from-mpk-file-generated-from-a/m-p/377769#M4463</guid>
      <dc:creator>NagmaYasmin</dc:creator>
      <dc:date>2017-07-09T20:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: Display a layers from .mpk file generated from a feature class</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/display-a-layers-from-mpk-file-generated-from-a/m-p/377770#M4464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your answer helped me a lot thanks&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jul 2017 10:16:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/display-a-layers-from-mpk-file-generated-from-a/m-p/377770#M4464</guid>
      <dc:creator>ManelKEDDAR</dc:creator>
      <dc:date>2017-07-18T10:16:44Z</dc:date>
    </item>
  </channel>
</rss>

