<?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: Legend Dijit Problem in Internet Explorer (IE) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124274#M11582</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, we just figured out why it wasn't working in IE. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since we're using the previously mentioned TOC widget, there are a couple lines in the TOC.js file that we needed to modify:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
if(!dojo.isIE &amp;amp;&amp;amp; a.imageData &amp;amp;&amp;amp; a.imageData.length &amp;gt; 0) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; b = "data:image/png;base64," + a.imageData
&amp;nbsp; }else {
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(b.indexOf("http") !== 0) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b = &lt;STRONG&gt;"https://www.website.com/gis/proxy/proxy.ashx?" +&lt;/STRONG&gt; this.service.url + "/" + this.layer.id + "/images/" + b
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All we simply did was add our website proxy URL in front of this.service.url and it works perfectly. Just by reading the above code, it seems that IE handles the images differently than other browsers. Boo Microsoft.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 07:07:02 GMT</pubDate>
    <dc:creator>AndrewBrown1</dc:creator>
    <dc:date>2021-12-11T07:07:02Z</dc:date>
    <item>
      <title>Legend Dijit Problem in Internet Explorer (IE)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124272#M11580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is anyone else having a problem with the Legend dijit in JSAPI v2.1+ and IE? The legend dijit seems to work fine using services from ArcGIS Server version 9.3,9.3.1 and 10 in Firefox and other browsers but fails to load/generate legends from 9.3.1 versions in IE 7 and 8. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the Legend.xd.js the following line exists which is used to construct a request to generate legend symbols for the dijit. However this URL is returning a 302 - Temporarily redirected status. IE doesn't seem to follow the redirect within the javascript code. Manually entering the address with the soapURL parameter does get redirected correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Legend.xd.js&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;_legendUrl:"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.arcgis.com/sharing/tools/legend" rel="nofollow" target="_blank"&gt;http://www.arcgis.com/sharing/tools/legend&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone now of a way to override this to set it to the current legend service at &lt;/SPAN&gt;&lt;A href="http://utility.arcgis.com/sharing/tools/legend"&gt;http://utility.arcgis.com/sharing/tools/legend&lt;/A&gt;&lt;SPAN&gt; or other legend service?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2011 18:44:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124272#M11580</guid>
      <dc:creator>PatrickWilke-Brown</dc:creator>
      <dc:date>2011-10-31T18:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Legend Dijit Problem in Internet Explorer (IE)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124273#M11581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you using the secured service?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are with a proxy, and we're having the same issue. We're using the TOC Control listed below, and the icons show up on Firefox and Chrome, but not in IE 7/8. We're currently trying to figure it out, and we think that the GET command for the legend symbols isn't utilizing the proxy, thus returning nothing. It is odd why it works on other browsers though...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.arcgis.com/home/item.html?id=9c43bdf76a23452ba1d95684f7cd76d8"&gt;http://www.arcgis.com/home/item.html?id=9c43bdf76a23452ba1d95684f7cd76d8&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Nov 2011 20:35:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124273#M11581</guid>
      <dc:creator>AndrewBrown1</dc:creator>
      <dc:date>2011-11-01T20:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: Legend Dijit Problem in Internet Explorer (IE)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124274#M11582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, we just figured out why it wasn't working in IE. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since we're using the previously mentioned TOC widget, there are a couple lines in the TOC.js file that we needed to modify:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
if(!dojo.isIE &amp;amp;&amp;amp; a.imageData &amp;amp;&amp;amp; a.imageData.length &amp;gt; 0) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; b = "data:image/png;base64," + a.imageData
&amp;nbsp; }else {
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(b.indexOf("http") !== 0) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b = &lt;STRONG&gt;"https://www.website.com/gis/proxy/proxy.ashx?" +&lt;/STRONG&gt; this.service.url + "/" + this.layer.id + "/images/" + b
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All we simply did was add our website proxy URL in front of this.service.url and it works perfectly. Just by reading the above code, it seems that IE handles the images differently than other browsers. Boo Microsoft.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:07:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124274#M11582</guid>
      <dc:creator>AndrewBrown1</dc:creator>
      <dc:date>2021-12-11T07:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Legend Dijit Problem in Internet Explorer (IE)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124275#M11583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am not using a proxy. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Originally I had been using something similar to the TOC legend you are using but kept running into problems so I started testing for the problem using one of the ESRI Legend Dijit samples. Ran into the same problem. FF,Chrome,Safari all render the legend from both a 10.0 and 9.3.1 service, the 10.0 using the REST api and the 9.3.1 service using ESRI's utility.arcgis.com legend service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I downloaded the 2.5 JSAPI so that I could host it locally. This also allowed me to change the URL to the ESRI legend service. It is currently hardcoded to &lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.esri.com/www.arcgis.com"&gt;www.arcgis.com/&lt;/A&gt;&lt;SPAN&gt;... but gets redirected to &lt;/SPAN&gt;&lt;A href="http://utility.arcgis.com"&gt;http://utility.arcgis.com&lt;/A&gt;&lt;SPAN&gt;. I changed the URL in Legend.xd.js to utility.arcgis.com to bypass the redirect. After doing this I can use the IE8 developer tools to inspect the response after the legend.startup. It looks like the legend images from the 9.3.1 legend are being generated by the ESRI legend service request but not being handled correctly within the JSAPI. Probably something similar to the problem described in the previous message. Your response give me hint to where to start looking.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2011 13:06:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124275#M11583</guid>
      <dc:creator>PatrickWilke-Brown</dc:creator>
      <dc:date>2011-11-03T13:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Legend Dijit Problem in Internet Explorer (IE)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124276#M11584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&lt;SPAN&gt;Follow up to problem. I mistakenly identified this as an issue with 9.3.1 services. The problem in our case was in the Legend.xd.js and how the generated legend image resource location is checked. We have all of our services as &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://" rel="nofollow noopener noreferrer" target="_blank"&gt;https://&lt;/A&gt;&lt;SPAN&gt; resources, some of logic in Legend.xd.js was checking to see if &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow noopener noreferrer" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt; existed and if it didn't then append the original service URL + /image/ to the legend patch location. This doesn't exist in 9.3.1 services. Using a local copy of v. 2.5 of the JSAPI i changed the following lines so that it would work with our services.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Legend.xs.js (unminified)

~line 412 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
OLD //if((_43.url &amp;amp;&amp;amp; _43.url.indexOf("http://") &amp;gt; -1) || (_43.imageData &amp;amp;&amp;amp; _43.imageData.length &amp;gt; 0)) {
NEW if((_43.url &amp;amp;&amp;amp; _43.url.indexOf("http://") &amp;gt; -1) || (_43.url &amp;amp;&amp;amp; _43.url.indexOf("https://") &amp;gt; -1) || (_43.imageData &amp;amp;&amp;amp; _43.imageData.length &amp;gt; 0)) {

~line 456, this probably should be handled differently since if if http:// wasn't present /image/ was appended.
OLD //if( (_44.url.indexOf("http://") == -1)) {
NEW if( (_44.url.indexOf("http://") == -1) &amp;amp;&amp;amp; _44.url.indexOf("https://") == -1) {

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:07:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124276#M11584</guid>
      <dc:creator>PatrickWilke-Brown</dc:creator>
      <dc:date>2021-12-11T07:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Legend Dijit Problem in Internet Explorer (IE)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124277#M11585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Patrick,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for reporting this issue. We are working to fix this for the next release of the ArcGIS API for JavaScript.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2011 21:24:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124277#M11585</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2011-11-03T21:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Legend Dijit Problem in Internet Explorer (IE)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124278#M11586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Patrick,&lt;BR /&gt;&lt;BR /&gt;Thanks for reporting this issue. We are working to fix this for the next release of the ArcGIS API for JavaScript.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am still having this problem, running AGS 10.04 and using API v2.8.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there an easy fix or known work around?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2012 13:43:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124278#M11586</guid>
      <dc:creator>BenSayers</dc:creator>
      <dc:date>2012-05-10T13:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Legend Dijit Problem in Internet Explorer (IE)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124279#M11587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have found the same issue with API 3.0 and arcgis server 10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in IE the legend works in a different way and the images are loaded via http and they dont pass through the proxy. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have found this workaround, hope it helps:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function onZoomEnd()
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (navigator.appName == 'Microsoft Internet Explorer')
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; timer = setTimeout(function () {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var imgs = dojo.query('.esriLegendLayer &amp;gt; tbody &amp;gt; tr &amp;gt; td &amp;gt; img');
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(var i=0; i&amp;lt;imgs.length; i++){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imgs&lt;I&gt;.src = "yourproxy" + imgs&lt;I&gt;.src;
&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; }, 100);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}
&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:07:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124279#M11587</guid>
      <dc:creator>DavideLimosani</dc:creator>
      <dc:date>2021-12-11T07:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Legend Dijit Problem in Internet Explorer (IE)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124280#M11588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just got round to reviewing my 'workarounds' for this issue (same cause for legend images and feature layer images) and I'm unpleasantly surprised that it still exists in v3.0.&amp;nbsp; All other operations (export, query, identify, find etc. etc.) use the proxy correctly, any idea when &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;this&lt;/SPAN&gt;&lt;SPAN&gt; problem will be addressed?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2012 14:49:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/legend-dijit-problem-in-internet-explorer-ie/m-p/124280#M11588</guid>
      <dc:creator>__Rich_</dc:creator>
      <dc:date>2012-07-30T14:49:43Z</dc:date>
    </item>
  </channel>
</rss>

