<?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: wrapAround180 bug in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wraparound180-bug/m-p/601621#M56290</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This still hasn't been fixed in 3.15.&amp;nbsp; I've attached a document illustrating what's happening.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is this line in the _coremap module that's causing the problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="_jivemacro_uid_14527944849766814 jive_macro_code jive_text_macro" data-renderedposition="92_8_912_16" jivemacro_uid="_14527944849766814"&gt;&lt;P&gt;if (!b || Math.abs(c.origin[0] - b.origin.x) &amp;gt; c.dx) this.wrapAround180 = !1;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The comparison between origin values of WGS 84 and Web Mercator results in wrapAround180 being forced to false.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jan 2016 18:03:43 GMT</pubDate>
    <dc:creator>JoelBennett</dc:creator>
    <dc:date>2016-01-14T18:03:43Z</dc:date>
    <item>
      <title>wrapAround180 bug</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wraparound180-bug/m-p/601620#M56289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've found that the map's wrapAround180 behavior will fail under certain circumstances where it should not.&amp;nbsp; When instantiating a map with wrapAround180 set to true, and the lods option specified, the map will create an internal TileInfo object based on WGS 84 (4326).&amp;nbsp; However, if you add a tiled layer based on Web Mercator (which all of mine are), the map will make some internal comparisons between the Web Mercator spatial reference and WGS 84 spatial reference definitions, and conclude wrapping is no longer possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem therefore lies with the default TileInfo created by the map, over which the user has no documented control, and which is created whether or not you have any layers based on WGS 84.&amp;nbsp; There is a workaround though.&amp;nbsp; After instantiating your map, create a new TileInfo object based on Web Mercator, and make a couple assignments:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var map = new Map("map", options);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var tileInfo = new TileInfo({&lt;/P&gt;&lt;P&gt;&amp;nbsp; dpi: 96,&lt;/P&gt;&lt;P&gt;&amp;nbsp; height: 256,&lt;/P&gt;&lt;P&gt;&amp;nbsp; lods: options.lods,&lt;/P&gt;&lt;P&gt;&amp;nbsp; origin: new Point(-20037508.342787, 20037508.342787, new SpatialReference(102100)),&lt;/P&gt;&lt;P&gt;&amp;nbsp; spatialReference: new SpatialReference(102100),&lt;/P&gt;&lt;P&gt;&amp;nbsp; width: 256&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;map._params.tileInfo = tileInfo;&lt;/P&gt;&lt;P&gt;map.__tileInfo = tileInfo;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm currently using version 3.13.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 17:51:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wraparound180-bug/m-p/601620#M56289</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2015-06-10T17:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: wrapAround180 bug</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wraparound180-bug/m-p/601621#M56290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This still hasn't been fixed in 3.15.&amp;nbsp; I've attached a document illustrating what's happening.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is this line in the _coremap module that's causing the problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="_jivemacro_uid_14527944849766814 jive_macro_code jive_text_macro" data-renderedposition="92_8_912_16" jivemacro_uid="_14527944849766814"&gt;&lt;P&gt;if (!b || Math.abs(c.origin[0] - b.origin.x) &amp;gt; c.dx) this.wrapAround180 = !1;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The comparison between origin values of WGS 84 and Web Mercator results in wrapAround180 being forced to false.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 18:03:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wraparound180-bug/m-p/601621#M56290</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2016-01-14T18:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: wrapAround180 bug</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wraparound180-bug/m-p/601622#M56291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ESRI did not fix this bug in version 3.16 of the ArcGIS API for JavaScript.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2016 14:59:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wraparound180-bug/m-p/601622#M56291</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2016-04-08T14:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: wrapAround180 bug</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wraparound180-bug/m-p/601623#M56292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you reported this bug to Esri apart from posting it here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2016 15:19:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wraparound180-bug/m-p/601623#M56292</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2016-04-08T15:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: wrapAround180 bug</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wraparound180-bug/m-p/601624#M56293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, I would only do that if there was no way around a bug.&amp;nbsp; More than once, I have reported bugs to ESRI the official way, along with how to fix them, but in vain.&amp;nbsp; I'm not willing to do that anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My purpose here is to keep other developers who run into these problems informed that (1) the problems do exist, (2) it's not their fault, and (3) there are known workarounds.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2016 15:30:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wraparound180-bug/m-p/601624#M56293</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2016-04-08T15:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: wrapAround180 bug</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wraparound180-bug/m-p/601625#M56294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some of the bugs I've encountered have not been remedied, but that doesn't stop my from reporting ones that I come across. If a bug isn't made known, then it won't be fixed in future releases. Also, when I've called in a bug that turned out to be already identified, Esri support will usually suggest that adding additional reports about a bug will give it a higher priority.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2016 15:37:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wraparound180-bug/m-p/601625#M56294</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2016-04-08T15:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: wrapAround180 bug</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wraparound180-bug/m-p/601626#M56295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've missed a few releases here, but found the workaround is still necessary in 3.24.&amp;nbsp; I've also found the problem only appears to manifest if the first layer added to the map is not a tiled layer (e.g. an ArcGISDynamicMapServiceLayer)...this is probably true of previous versions as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our workflow is to add&amp;nbsp;a locally hosted layer first, and then add ESRI basemaps afterwards so that&amp;nbsp;startup isn't dependent on a third party service.&amp;nbsp; That first layer could be tiled or dynamic, depending on different circumstances, and the problem happens for the latter, but not the former.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 21:45:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wraparound180-bug/m-p/601626#M56295</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2018-05-07T21:45:09Z</dc:date>
    </item>
  </channel>
</rss>

