<?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: SpatialReferende missing info causes endless loop in edit toolbar with textsymbol in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatialreferende-missing-info-causes-endless-loop/m-p/40169#M3447</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Santo,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's been fixed for the next release.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Apr 2014 15:38:57 GMT</pubDate>
    <dc:creator>JianHuang</dc:creator>
    <dc:date>2014-04-28T15:38:57Z</dc:date>
    <item>
      <title>SpatialReferende missing info causes endless loop in edit toolbar with textsymbol.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatialreferende-missing-info-causes-endless-loop/m-p/40168#M3446</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;BR /&gt;&lt;SPAN&gt;I have the following situation:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A map with a wkid of 31462 is using the edit toolbar.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I try to resize a TextSymbol, it freezes. (high cpu usage, no response)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tracked it down to this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In esri/toolbars/_Box.js _deNormalizePoint calls this._map._getFrameWidth() which returns -1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It then does a loop that continues while Math.abs(...) &amp;gt;= -1, which obviously will never end.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map._getFrameWidth's problem is that it returns -1 if this.spatialReference._getInfo returns null and this.__LOD is not set.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;spatialReference._getInfo checks the map spatialReference._info if it contains an entry for the wkid, which does not exist.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So my guess is that I need to add data for the wkid to the spatialReference._info array or add LOD data to the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know what I might be missing ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not too deep into gis, and hours of googling did not find me any solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll try to put together a simple example to show the issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On a sidenote, the esri edit toolbar should not freeze the browser when there is no data available for a wkid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 14:16:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatialreferende-missing-info-causes-endless-loop/m-p/40168#M3446</guid>
      <dc:creator>SantoPfingsten</dc:creator>
      <dc:date>2014-04-28T14:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: SpatialReferende missing info causes endless loop in edit toolbar with textsymbol</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatialreferende-missing-info-causes-endless-loop/m-p/40169#M3447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Santo,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's been fixed for the next release.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 15:38:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatialreferende-missing-info-causes-endless-loop/m-p/40169#M3447</guid>
      <dc:creator>JianHuang</dc:creator>
      <dc:date>2014-04-28T15:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: SpatialReferende missing info causes endless loop in edit toolbar with textsymbol</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatialreferende-missing-info-causes-endless-loop/m-p/40170#M3448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you change the wkid to its replacement, 31466? It's the same coordinate system, just a slightly different name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Melita&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 15:45:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatialreferende-missing-info-causes-endless-loop/m-p/40170#M3448</guid>
      <dc:creator>MelitaKennedy</dc:creator>
      <dc:date>2014-04-28T15:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: SpatialReferende missing info causes endless loop in edit toolbar with textsymbol</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatialreferende-missing-info-causes-endless-loop/m-p/40171#M3449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the quick reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When will the next version be released ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I work around the issue it until then ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@Melita: I can't replace it in the map, and simply supplying a new SpatialReference object with the wkid does not seem to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But I don't see how that would work anyway, since the only wkids in the spatialReference._info map are: 3785, 3857, 4326, 102100,102113&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2014 09:03:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatialreferende-missing-info-causes-endless-loop/m-p/40171#M3449</guid>
      <dc:creator>SantoPfingsten</dc:creator>
      <dc:date>2014-04-30T09:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: SpatialReferende missing info causes endless loop in edit toolbar with textsymbol</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatialreferende-missing-info-causes-endless-loop/m-p/40172#M3450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't have access to the source code, but I still want to help because it was a bug of mine. Hopefully the workaround below would work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;when you create your application, require this module: "esri/toolbars/_Box", and replace the _deNormalizePoint function in the prototype.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
require(["esri/toolbars/_Box",...other modules you need], function(Box, other module names){
&amp;nbsp; //you can check the source of the function _deNormalizePoint by examing the property 
&amp;nbsp; //Box.prototype._deNormalizePoint
&amp;nbsp; //once you have the minified code of the function, you can modify it as:
&amp;nbsp; Box.prototype._deNormalizePoint = function (d,a){
&amp;nbsp;&amp;nbsp;&amp;nbsp; //you add the following line of code
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (this._map._getFrameWidth() === -1)return d;
&amp;nbsp; for(var b=this._map._getFrameWidth(),c={x:d.x,y:d.y};Math.abs(c.x-a.x)&amp;gt;=b;)c.x=c.x&amp;lt;a.x?c.x+b:c.x-b;var e=Math.abs(c.x-a.x);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Math.abs(c.x-a.x+b)&amp;lt;e?c.x+=b:Math.abs(c.x-a.x-b)&amp;lt;e&amp;amp;&amp;amp;(c.x-=b);return c
&amp;nbsp; };
&amp;nbsp; //the rest of your code of the application
});
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://jsfiddle.net/9PRdH/3/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://jsfiddle.net/9PRdH/3/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:33:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatialreferende-missing-info-causes-endless-loop/m-p/40172#M3450</guid>
      <dc:creator>JianHuang</dc:creator>
      <dc:date>2021-12-10T21:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: SpatialReferende missing info causes endless loop in edit toolbar with textsymbol</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatialreferende-missing-info-causes-endless-loop/m-p/40173#M3451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, that does solve the issue.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 06:51:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatialreferende-missing-info-causes-endless-loop/m-p/40173#M3451</guid>
      <dc:creator>SantoPfingsten</dc:creator>
      <dc:date>2014-05-05T06:51:56Z</dc:date>
    </item>
  </channel>
</rss>

