<?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: Problems with TOC or map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472787#M43829</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Maybe it's becuase the example Esri feature Service doesn't allow to store created edits. I think, it's just for demo.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've used this editing service: &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jssamples/ed_simpletoolbar.html"&gt;https://developers.arcgis.com/en/javascript/jssamples/ed_simpletoolbar.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;...I have modified version with own services, which should be used later on. I've just created this version with esri services for the forum.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So...is there a way to have a working toc, to see lines of measurement tool and editing tool and to have an updating map, where I don't have to pan for an update?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much for your support &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Oct 2013 16:44:14 GMT</pubDate>
    <dc:creator>DominikSchlarmann</dc:creator>
    <dc:date>2013-10-14T16:44:14Z</dc:date>
    <item>
      <title>Problems with TOC or map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472783#M43825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a wired problem in my map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1.) Either I can use NLiu's TOC, but the map doesn't update when I zoom. I have to pan the to update the map. Also I can see the lines for the editor and measurement widget. These are working, but I don't see any lines.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.) Or I can have a map, where the map updates on zooming without panning. There I can also see the line features of measurement and editor tool. But I can't use nliu's TOC. The TOC doesn't display and all layers are added.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I assume that this error is caused by a wrong placement of&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.on("layers-add-result", initEditor);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;because this is more or less the difference between both versions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are the jsfiddles:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;No refresh of map with working TOC, but no lines of editor and measurement tool (1):&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://jsfiddle.net/3zpMT/"&gt;http://jsfiddle.net/3zpMT/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Refresh of TOC with working measurement and editor tool, but no toc (2):&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://jsfiddle.net/DfnnD/"&gt;http://jsfiddle.net/DfnnD/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would be awesome, if anybody could help me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dominik&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 10:50:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472783#M43825</guid>
      <dc:creator>DominikSchlarmann</dc:creator>
      <dc:date>2013-10-14T10:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with TOC or map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472784#M43826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: jeff.pace&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The TOC has its own add-layers listener&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(this.map, 'onLayerAdd', this, function(layer) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.layerInfos.push({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer: layer
&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; this.refresh();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Therefore when you add your listener and then do add-layers its being fired twice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I commented out the addlayer listeners in the TOC, and added the call to the toc to&amp;nbsp; my main listener&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:54:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472784#M43826</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T20:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with TOC or map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472785#M43827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear Jeff (and of course everybody else:),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried to modify my code as suggested but unfortunately no success. The map doesn't update so I have to pan again to focus the map. Surely I've missplaced the function, deleted a wrong line or commeted out the wrong part.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Would it be possible that you provide your modification in my code in a jsfiddle?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks you very much.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 13:57:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472785#M43827</guid>
      <dc:creator>DominikSchlarmann</dc:creator>
      <dc:date>2013-10-14T13:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with TOC or map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472786#M43828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: jeff.pace&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i trieed your sample with the working TOC. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;THe edit lines are not drawing because it cannot find your proxy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://fiddle.jshell.net/proxy/?http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/FeatureServer/1/applyEdits"&gt;http://fiddle.jshell.net/proxy/?http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/FeatureServer/1/applyEdits&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;is what it is trying to hit.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 16:33:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472786#M43828</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-10-14T16:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with TOC or map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472787#M43829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Maybe it's becuase the example Esri feature Service doesn't allow to store created edits. I think, it's just for demo.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've used this editing service: &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jssamples/ed_simpletoolbar.html"&gt;https://developers.arcgis.com/en/javascript/jssamples/ed_simpletoolbar.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;...I have modified version with own services, which should be used later on. I've just created this version with esri services for the forum.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So...is there a way to have a working toc, to see lines of measurement tool and editing tool and to have an updating map, where I don't have to pan for an update?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much for your support &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 16:44:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472787#M43829</guid>
      <dc:creator>DominikSchlarmann</dc:creator>
      <dc:date>2013-10-14T16:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with TOC or map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472788#M43830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: jeff.pace&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this line isnt right&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;esriConfig.defaults.io.proxyUrl = "/proxy";&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it should be proxy.jsp, or proxy.php, etc.. and needs to point to a valid proxy file, which you don't have set up&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 18:58:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472788#M43830</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-10-14T18:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with TOC or map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472789#M43831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay....I will try to solve this problem will report in a couple of minutes (hopefully ;)).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dominik&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 19:18:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472789#M43831</guid>
      <dc:creator>DominikSchlarmann</dc:creator>
      <dc:date>2013-10-14T19:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with TOC or map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472790#M43832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Schlomm&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Okay...following the guideline &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jshelp/ags_proxy.html" rel="nofollow noopener noreferrer" target="_blank"&gt;here&lt;/A&gt;&lt;SPAN&gt;, I've set up a proxy.jsp file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just for clarification:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've downloaded the proxy.jsp template, extracted it in the root of my webserver (in my case it's ISS &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; and modified just the following lines:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;String[] serverUrls = {
&amp;nbsp; //"&amp;lt;url&amp;gt;[,&amp;lt;token&amp;gt;]"
&amp;nbsp; //For ex. (secured server): "http://myserver.mycompany.com/arcgis/rest/services,ayn2C2iPvqjeqWoXwV6rjmr43kyo23mhIPnXz2CEiMA6rVu0xR0St8gKsd0olv8a"
&amp;nbsp; //For ex. (non-secured server): "http://sampleserver1.arcgisonline.com/arcgis/rest/services"
&amp;nbsp; "http://sampleserver1.arcgisonline.com/arcgis/rest/services",
&amp;nbsp; "http://sampleserver2.arcgisonline.com/arcgis/rest/services" //NOTE - no comma after the last item
};&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;String[] serverUrls = {
&amp;nbsp; //"&amp;lt;url&amp;gt;[,&amp;lt;token&amp;gt;]"
&amp;nbsp; //For ex. (secured server): "http://myserver.mycompany.com/arcgis/rest/services,ayn2C2iPvqjeqWoXwV6rjmr43kyo23mhIPnXz2CEiMA6rVu0xR0St8gKsd0olv8a"
&amp;nbsp; //For ex. (non-secured server): "http://sampleserver1.arcgisonline.com/arcgis/rest/services"
"http://geo-arcgis.abc-efg.de:6080/arcgis/rest/services"
};&lt;/PRE&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For now I want to try it out without https.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I've modified the line in the html file to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esri.config.defaults.io.proxyUrl = "proxy.jsp";&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The html file and the proxy.jsp are both stored in the root folder of the ISS WebServer: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;C:\inetpub\wwwroot\webmap.html&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;C:\inetpub\wwwroot\proxy.jsp&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Everything right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It would be so nice, to have a fully working webapplication with a working TOC, visible measurement and editor features and that the map update itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/446218"&gt;@Jeff&lt;/a&gt;: I've sent you a private message. I hope, it's okay.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:54:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472790#M43832</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T20:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with TOC or map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472791#M43833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry for pushing this up :(, but it's crucial for me that the map updates on it's own and to have the working toc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe it's just the right re-positioning of the code in post #2?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Or is the configuration of the proxy elementary to have a working toc/self-updating (without panning) map?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway: Thanks a lot &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 19:31:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472791#M43833</guid>
      <dc:creator>DominikSchlarmann</dc:creator>
      <dc:date>2013-10-15T19:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with TOC or map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472792#M43834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dominik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may have resolved this problem by now. But, I ran into the same issue earlier this week. I was just able to resolve it by following this example: &lt;A href="https://developers.arcgis.com/javascript/jssamples/map_twodynamic.html" title="https://developers.arcgis.com/javascript/jssamples/map_twodynamic.html"&gt;Add two dynamic maps | ArcGIS API for JavaScript&lt;/A&gt; . Maybe it will work for you as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ashley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 13:29:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-toc-or-map/m-p/472792#M43834</guid>
      <dc:creator>AshleyPeters</dc:creator>
      <dc:date>2015-08-12T13:29:53Z</dc:date>
    </item>
  </channel>
</rss>

