<?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: how can I save map and layers settings in a cookie in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-save-map-and-layers-settings-in-a-cookie/m-p/107226#M9947</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, for your first question, you can store some basic data in a cookie.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dojo has a cookie module you can use.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://dojotoolkit.org/reference-guide/1.7/dojo/cookie.html"&gt;http://dojotoolkit.org/reference-guide/1.7/dojo/cookie.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You wouldn't want to store too much stuff, I think cookies have a 4kb limit, but that's plenty to store some config information.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As for your second question, not sure. Are you waiting for the "onLayersAdd" event?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Aug 2012 13:12:41 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2012-08-01T13:12:41Z</dc:date>
    <item>
      <title>how can I save map and layers settings in a cookie</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-save-map-and-layers-settings-in-a-cookie/m-p/107225#M9946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using Arcgis Javascript 3.0 with TOC to make a tree structure of layers and I want to save client user settings in a cookie, to make it easy for the user to follow up next day . Is there an easy way to do that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That is my first question.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My second question is that I have problem with TOC tree layers structure. I have to reload my page in order to get the TOC to work and display the layers tree structure. Can anybody tell me why?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var toc = new agsjs.dijit.TOC({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map: map,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerInfos: layerInfosTemp,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; closable: true
&amp;nbsp;&amp;nbsp;&amp;nbsp; }, 'layersGrouped');
&amp;nbsp;&amp;nbsp;&amp;nbsp; toc.startup();&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 07:44:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-save-map-and-layers-settings-in-a-cookie/m-p/107225#M9946</guid>
      <dc:creator>JosephDaood</dc:creator>
      <dc:date>2012-08-01T07:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: how can I save map and layers settings in a cookie</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-save-map-and-layers-settings-in-a-cookie/m-p/107226#M9947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, for your first question, you can store some basic data in a cookie.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dojo has a cookie module you can use.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://dojotoolkit.org/reference-guide/1.7/dojo/cookie.html"&gt;http://dojotoolkit.org/reference-guide/1.7/dojo/cookie.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You wouldn't want to store too much stuff, I think cookies have a 4kb limit, but that's plenty to store some config information.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As for your second question, not sure. Are you waiting for the "onLayersAdd" event?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 13:12:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-save-map-and-layers-settings-in-a-cookie/m-p/107226#M9947</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2012-08-01T13:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: how can I save map and layers settings in a cookie</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-save-map-and-layers-settings-in-a-cookie/m-p/107227#M9948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I already use cookie from dojo to store map extent as bookmark. I thought that saving user map setting are used almost in any web application, and there is a standard way to do that in arcgis JS. Maybe I am wrong, so if I have to code the map Save Setting function by myself, can you tell me how to get a list of all active layers and sub layers from the map object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As for my second question. I am not using or waiting for "onLayersAdd" event.&amp;nbsp; And there are others that have the same problem. Look at the last comment in forum &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/60570-Using-AGSJS-TOC-with-ArcGIS-Javascript-3.0?highlight=agsjs"&gt;http://forums.arcgis.com/threads/60570-Using-AGSJS-TOC-with-ArcGIS-Javascript-3.0?highlight=agsjs&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 10:06:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-save-map-and-layers-settings-in-a-cookie/m-p/107227#M9948</guid>
      <dc:creator>JosephDaood</dc:creator>
      <dc:date>2012-08-02T10:06:11Z</dc:date>
    </item>
  </channel>
</rss>

