<?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 CreateCache from mobile Service, Feature Layers are null in ArcGIS for Windows Mobile Questions</title>
    <link>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/createcache-from-mobile-service-feature-layers-are/m-p/662946#M2805</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have published a mobile map service with 2 feature layers, When we look at the service via the web browser and look at the services folder we can see the available service with the 2 layers, but when I use the following code the MapCache object's Layers and FeatureLayers remain null. When we do the same thing but with the sample map cache the layers and featureLayers are present.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anybody point me in the right direction as to why the layers are not coming in?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Are feature layers are empty (Is that are problem?) we want to add points via the mobile app and the sync those changes back to the server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the code (simplified for this posting):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;_mobileServiceCache = new MobileCache(@"\Temp\ServiceCache");
mobileServiceConnection1.Url = @"http://&amp;lt;ourserver&amp;gt;.com/ArcGIS/services/FieldLayout/Map1/MapServer/MobileServer";
mobileServiceConnection1.CreateCache(_mobileServiceCache);
_mobileServiceCache.Open();

var agent = new MobileCacheSyncAgent(_mobileServiceCache, mobileServiceConnection1);
agent.DownloadExtent(_mobileServiceCache.GetExtent(), 0, 0);
map1.DataSources.Add(_mobileServiceCache);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;now the _mobileServiceCache.Layers and FeatureLayers are null.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Aug 2010 17:02:07 GMT</pubDate>
    <dc:creator>RyanBates</dc:creator>
    <dc:date>2010-08-06T17:02:07Z</dc:date>
    <item>
      <title>CreateCache from mobile Service, Feature Layers are null</title>
      <link>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/createcache-from-mobile-service-feature-layers-are/m-p/662946#M2805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have published a mobile map service with 2 feature layers, When we look at the service via the web browser and look at the services folder we can see the available service with the 2 layers, but when I use the following code the MapCache object's Layers and FeatureLayers remain null. When we do the same thing but with the sample map cache the layers and featureLayers are present.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anybody point me in the right direction as to why the layers are not coming in?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Are feature layers are empty (Is that are problem?) we want to add points via the mobile app and the sync those changes back to the server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the code (simplified for this posting):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;_mobileServiceCache = new MobileCache(@"\Temp\ServiceCache");
mobileServiceConnection1.Url = @"http://&amp;lt;ourserver&amp;gt;.com/ArcGIS/services/FieldLayout/Map1/MapServer/MobileServer";
mobileServiceConnection1.CreateCache(_mobileServiceCache);
_mobileServiceCache.Open();

var agent = new MobileCacheSyncAgent(_mobileServiceCache, mobileServiceConnection1);
agent.DownloadExtent(_mobileServiceCache.GetExtent(), 0, 0);
map1.DataSources.Add(_mobileServiceCache);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;now the _mobileServiceCache.Layers and FeatureLayers are null.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Aug 2010 17:02:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/createcache-from-mobile-service-feature-layers-are/m-p/662946#M2805</guid>
      <dc:creator>RyanBates</dc:creator>
      <dc:date>2010-08-06T17:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: CreateCache from mobile Service, Feature Layers are null</title>
      <link>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/createcache-from-mobile-service-feature-layers-are/m-p/662947#M2806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So I will answer my own thread to prove how dumb you can be.... The problem was that I had two mobileCache variables and do to a copy paste error I was looking at the mobileCache that had not yet been initialized therefore the layers were null. Yes I guess I am that dumb, but at least I caught my own stupidity instead of getting it pointed out to me...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 19:30:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/createcache-from-mobile-service-feature-layers-are/m-p/662947#M2806</guid>
      <dc:creator>RyanBates</dc:creator>
      <dc:date>2010-08-09T19:30:09Z</dc:date>
    </item>
  </channel>
</rss>

