<?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 Getting AGSDynamicMapServiceLayer to refresh programmatically in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/getting-agsdynamicmapservicelayer-to-refresh/m-p/221533#M2031</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an ArcGIS Server (10.1 SP1) REST map service whose underlying data (in ArcSDE) is changing constantly.&amp;nbsp; And I have an AGSDynamicMapServiceLayer that renders that map service in my app.&amp;nbsp; (It's running in iOS 6.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to periodically (e.g. every 60 seconds) refresh the map to see the latest data.&amp;nbsp; However, I can't seem to do it without panning or zooming.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried invoking &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;dataChanged&lt;/SPAN&gt;&lt;SPAN&gt; on the layer, i.e.:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;AGSDynamicMapServiceLayer* layer = ...;
[layer dataChanged];&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;...but it has no effect.&amp;nbsp; I've tried invoking &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;clear&lt;/SPAN&gt;&lt;SPAN&gt; on the layer's view, i.e.:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;AGSMapView* mapView = ...;
UIView&amp;lt;AGSLayerView&amp;gt;* layerView = [mapView.mapLayerViews objectForKey:layer.name];
[layerView clear];&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;...but that has no effect either (other than causing that layer to flash quickly, but reappear exactly as it was).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there some way to force a refresh from the server?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it perhaps a caching issue at the operating system level, since the URL of the exported image is the same?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Dec 2012 13:46:53 GMT</pubDate>
    <dc:creator>ChristopherDillard</dc:creator>
    <dc:date>2012-12-14T13:46:53Z</dc:date>
    <item>
      <title>Getting AGSDynamicMapServiceLayer to refresh programmatically</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/getting-agsdynamicmapservicelayer-to-refresh/m-p/221533#M2031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an ArcGIS Server (10.1 SP1) REST map service whose underlying data (in ArcSDE) is changing constantly.&amp;nbsp; And I have an AGSDynamicMapServiceLayer that renders that map service in my app.&amp;nbsp; (It's running in iOS 6.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to periodically (e.g. every 60 seconds) refresh the map to see the latest data.&amp;nbsp; However, I can't seem to do it without panning or zooming.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried invoking &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;dataChanged&lt;/SPAN&gt;&lt;SPAN&gt; on the layer, i.e.:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;AGSDynamicMapServiceLayer* layer = ...;
[layer dataChanged];&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;...but it has no effect.&amp;nbsp; I've tried invoking &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;clear&lt;/SPAN&gt;&lt;SPAN&gt; on the layer's view, i.e.:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;AGSMapView* mapView = ...;
UIView&amp;lt;AGSLayerView&amp;gt;* layerView = [mapView.mapLayerViews objectForKey:layer.name];
[layerView clear];&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;...but that has no effect either (other than causing that layer to flash quickly, but reappear exactly as it was).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there some way to force a refresh from the server?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it perhaps a caching issue at the operating system level, since the URL of the exported image is the same?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2012 13:46:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/getting-agsdynamicmapservicelayer-to-refresh/m-p/221533#M2031</guid>
      <dc:creator>ChristopherDillard</dc:creator>
      <dc:date>2012-12-14T13:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Getting AGSDynamicMapServiceLayer to refresh programmatically</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/getting-agsdynamicmapservicelayer-to-refresh/m-p/221534#M2032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried to remove the layer and then add it again to the mapview? Maybe that works.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2012 16:58:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/getting-agsdynamicmapservicelayer-to-refresh/m-p/221534#M2032</guid>
      <dc:creator>PhilippFauser</dc:creator>
      <dc:date>2012-12-14T16:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Getting AGSDynamicMapServiceLayer to refresh programmatically</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/getting-agsdynamicmapservicelayer-to-refresh/m-p/221535#M2033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try this and let me know if it does not work...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//remove all url cache&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[[NSURLCache sharedURLCache] removeAllCachedResponses];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[layer dataChanged];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nimesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Dec 2012 20:44:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/getting-agsdynamicmapservicelayer-to-refresh/m-p/221535#M2033</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2012-12-16T20:44:46Z</dc:date>
    </item>
  </channel>
</rss>

