<?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 Is there a way to refresh the graphics on the map? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365612#M33902</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a feature layer that might display a feature that is comprised of 4 (sub-)features. I want to be able to show just one of those graphics by clicking on some text. Actually, I can do that but the map only displays that other feature if I change the extent. Is there another way to refresh the screen by not changing the extent?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jan 2012 17:53:16 GMT</pubDate>
    <dc:creator>MikeOnzay</dc:creator>
    <dc:date>2012-01-20T17:53:16Z</dc:date>
    <item>
      <title>Is there a way to refresh the graphics on the map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365612#M33902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a feature layer that might display a feature that is comprised of 4 (sub-)features. I want to be able to show just one of those graphics by clicking on some text. Actually, I can do that but the map only displays that other feature if I change the extent. Is there another way to refresh the screen by not changing the extent?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jan 2012 17:53:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365612#M33902</guid>
      <dc:creator>MikeOnzay</dc:creator>
      <dc:date>2012-01-20T17:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to refresh the graphics on the map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365613#M33903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Layers (including feature layers and graphics layers) and individual graphics have show() and hide() methods. If you want to control individual &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/graphic.htm" rel="nofollow" target="_blank"&gt;graphics&lt;/A&gt;&lt;SPAN&gt;, you can use show() or hide() on the graphic.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jan 2012 23:24:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365613#M33903</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-01-20T23:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to refresh the graphics on the map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365614#M33904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have one background street layer and one feature layer with points in it, and after doing a map.centerAndZoom() to one of the points the points either don't show up or they are so large that it blurs the screen.&amp;nbsp; I tried the "hide()" and "show()" methods but they do not help at all.&amp;nbsp; The only way to get everything in focus is to move the map a bit to refresh the extent, as the previous poster suggested.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So is there another way to refresh a feature layer that will work?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Charlie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 14:38:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365614#M33904</guid>
      <dc:creator>DougCollins</dc:creator>
      <dc:date>2012-01-24T14:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to refresh the graphics on the map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365615#M33905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have one background street layer and one feature layer with points in it, and after doing a map.centerAndZoom() to one of the points the points either don't show up or they are so large that it blurs the screen.&amp;nbsp; I tried the "hide()" and "show()" methods but they do not help at all.&amp;nbsp; The only way to get everything in focus is to move the map a bit to refresh the extent, as the previous poster suggested.&lt;BR /&gt;&lt;BR /&gt;So is there another way to refresh a feature layer that will work?&lt;BR /&gt;&lt;BR /&gt;Charlie&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you ever find resolution to this ?? I am having this exact same problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Moving the map a bit gives me the functionality that I need, but I want to simulate that func by the use of a "refresh" button on the screen. Please help Esri support.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 13:53:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365615#M33905</guid>
      <dc:creator>JosephHarris1</dc:creator>
      <dc:date>2013-01-15T13:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to refresh the graphics on the map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365616#M33906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are using a featurelayer, it supports refresh() and redraw() methods.&amp;nbsp; refresh() requeries the server, while redraw() just gets redraws the data from cache.&amp;nbsp; I don't see these methods documented in the API, but there were there before, and I've been using them for a while...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jay&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 18:22:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365616#M33906</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2013-01-15T18:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to refresh the graphics on the map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365617#M33907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If you are using a featurelayer, it supports refresh() and redraw() methods.&amp;nbsp; refresh() requeries the server, while redraw() just gets redraws the data from cache.&amp;nbsp; I don't see these methods documented in the API, but there were there before, and I've been using them for a while...&lt;BR /&gt;&lt;BR /&gt;Jay&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;hmmm, refresh() doesn't seem to do anything.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;map.refresh();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or am I using the incorrect syntax ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 18:55:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365617#M33907</guid>
      <dc:creator>JosephHarris1</dc:creator>
      <dc:date>2013-01-15T18:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to refresh the graphics on the map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365618#M33908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's featureLayer.refresh() not map.refresh(). Does that work for you?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;hmmm, refresh() doesn't seem to do anything.&lt;BR /&gt;&lt;BR /&gt;map.refresh();&lt;BR /&gt;&lt;BR /&gt;Or am I using the incorrect syntax ?&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 21:48:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365618#M33908</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2013-01-15T21:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to refresh the graphics on the map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365619#M33909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;featureLayer.refresh() worked for me, but if a feature is deleted or symbology changed the IE9 browser does not update/redraw the layer. I guess it reads from its cash insdead of making request to the server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The solution for me was to modify the request with preventCache = true; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I saw the solution in another post and tweek it to work with ArcGIS 10.1 and JavaScript 3.3 API&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
function init() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //modify the request with a preventCache option before it is sent to the server
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // so the feature layer is not cached in the browser
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; esri.setRequestPreCallback(function (ioArgs) {
&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; try {
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ioArgs.url.indexOf("FeatureServer") &amp;gt; -1 &amp;amp;&amp;amp;
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ioArgs.content.returnGeometry == true) {
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ioArgs.preventCache = true;
&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ioArgs;

&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; } catch (e) {
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(e.toString());
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ioArgs;
&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; }
&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;&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; //... initialize map here ...

}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:59:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365619#M33909</guid>
      <dc:creator>DimitarKolev</dc:creator>
      <dc:date>2021-12-11T16:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to refresh the graphics on the map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365620#M33910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had this problem for a very long time, but it looks that managed to find the solutions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It is only if you use proxy page.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just add&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;response.setHeader("Cache-Control","no-cache");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;response.setHeader("Pragma","no-cache");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;response.setDateHeader ("Expires", 0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to your proxy.jsp and all the requests will not be cached.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using JSAPI 2.8 and server 10.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 07:58:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-refresh-the-graphics-on-the-map/m-p/365620#M33910</guid>
      <dc:creator>Mindaugas_ižas</dc:creator>
      <dc:date>2013-04-03T07:58:05Z</dc:date>
    </item>
  </channel>
</rss>

