<?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 Open Street Map layer and a dynamic layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-open-street-map-layer-and-a-dynamic/m-p/256299#M23768</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;They must have the same datum to work properly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you are projecting a dynamic layer with this coordinate system &lt;/SPAN&gt;&lt;A href="http://spatialreference.org/ref/epsg/3760/esriwkt/"&gt;http://spatialreference.org/ref/epsg/3760/esriwkt/&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DATUM["D_North_American_1983_HARN",SPHEROID["GRS_1980",6378137,298.257222101]]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;on a basemap with this one &lt;/SPAN&gt;&lt;A href="http://spatialreference.org/ref/sr-org/7483/esriwkt/"&gt;http://spatialreference.org/ref/sr-org/7483/esriwkt/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Davide&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Jan 2013 06:46:17 GMT</pubDate>
    <dc:creator>DavideLimosani</dc:creator>
    <dc:date>2013-01-09T06:46:17Z</dc:date>
    <item>
      <title>Problems with Open Street Map layer and a dynamic layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-open-street-map-layer-and-a-dynamic/m-p/256296#M23765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to display an Open Street Map (OSM) layer along with a dynamic layer. If I display just one of these, it works as expected. If I make the OSM layer the first layer and add a dynamic layer, both display, but any dragging or zooming makes the dynamic disappear. If I make the dynamic layer first, the OSM layer, which should be on top, does not show at all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The coordinate systems of the two layers are different, and maybe that's the problem. I have not addressed that yet and suggestions on how to do that are welcome. The dynamic layer is the state of Hawaii. The extent I'm using is correct for it (Oahu), and the OSM layer shows an area in Africa for that extent, but I have not yet worried about that. Since the extent does show data for each layer, it seems that the combination of layers should at least both show.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The code is attached&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 18:09:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-open-street-map-layer-and-a-dynamic/m-p/256296#M23765</guid>
      <dc:creator>CraigPennington</dc:creator>
      <dc:date>2013-01-08T18:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Open Street Map layer and a dynamic layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-open-street-map-layer-and-a-dynamic/m-p/256297#M23766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You need to make sure you add the OSM layer first to set the map's spatial reference system to match your tiled layer. When your dynamic service is added, it will be projected on the fly to match.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;require(["esri/map", "esri/layers/osm", "esri/layers/agsdynamic"], function() {

&amp;nbsp; var map, osmLayer, url, HISlayer;

&amp;nbsp; map = new esri.Map("map");
&amp;nbsp; osmLayer = new esri.layers.OpenStreetMapLayer({ id: "OSM" });
&amp;nbsp; 
&amp;nbsp; var url = "http://mapsLiveCB.hawaiiinformation.com/ArcGIS/rest/services/HIS_BASE_Standard/MapServer";
&amp;nbsp; HISlayer = new esri.layers.ArcGISDynamicMapServiceLayer(url, { id: "standard" });
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; map.addLayer(osmLayer);
&amp;nbsp; map.addLayer(HISlayer);
});&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:38:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-open-street-map-layer-and-a-dynamic/m-p/256297#M23766</guid>
      <dc:creator>JeffJacobson</dc:creator>
      <dc:date>2021-12-11T12:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Open Street Map layer and a dynamic layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-open-street-map-layer-and-a-dynamic/m-p/256298#M23767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply.&amp;nbsp; It seems the only substantial changes you suggested were to start the layers visible and to load them separately with addLayer() instead of loading an array of layers with addLayers().&amp;nbsp; The program does load the OSM layer first in the OSM_HIS mode.&amp;nbsp; I've expanded the program (attached) to allow testing separate or array loads and found no difference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When OSM is loaded first, and the extent for Oahu based on the dynamic HIS layer is set, the OSM layer shows Africa with Oahu from the dynamic layer on top (which disappears if panned or zoomed).&amp;nbsp; If it were projected on the fly, as you suggest it should be and I had hoped it would be, the dynamic Oahu should not have shown in Africa.&amp;nbsp; If I instead use an extent for Oahu on OSM, the OSM Oahu shows, but the dynamic Oahu is not there, again indicating the on-the-fly projecting is not taking place.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wonder if I need some addtional setting/step to make the on-the-fly projection work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is on-the-fly projection of non-first layers expected to work only for tile layers?&amp;nbsp; The OSM layer class is a subclass of the tile class.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 21:57:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-open-street-map-layer-and-a-dynamic/m-p/256298#M23767</guid>
      <dc:creator>CraigPennington</dc:creator>
      <dc:date>2013-01-08T21:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Open Street Map layer and a dynamic layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-open-street-map-layer-and-a-dynamic/m-p/256299#M23768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;They must have the same datum to work properly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you are projecting a dynamic layer with this coordinate system &lt;/SPAN&gt;&lt;A href="http://spatialreference.org/ref/epsg/3760/esriwkt/"&gt;http://spatialreference.org/ref/epsg/3760/esriwkt/&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DATUM["D_North_American_1983_HARN",SPHEROID["GRS_1980",6378137,298.257222101]]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;on a basemap with this one &lt;/SPAN&gt;&lt;A href="http://spatialreference.org/ref/sr-org/7483/esriwkt/"&gt;http://spatialreference.org/ref/sr-org/7483/esriwkt/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Davide&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2013 06:46:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-open-street-map-layer-and-a-dynamic/m-p/256299#M23768</guid>
      <dc:creator>DavideLimosani</dc:creator>
      <dc:date>2013-01-09T06:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Open Street Map layer and a dynamic layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-open-street-map-layer-and-a-dynamic/m-p/256300#M23769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks for the reply.&amp;nbsp; It seems the only substantial changes you suggested were to start the layers visible and to load them separately with addLayer() instead of loading an array of layers with addLayers().&amp;nbsp; The program does load the OSM layer first in the OSM_HIS mode.&amp;nbsp; I've expanded the program (attached) to allow testing separate or array loads and found no difference.&lt;BR /&gt;&lt;BR /&gt;When OSM is loaded first, and the extent for Oahu based on the dynamic HIS layer is set, the OSM layer shows Africa with Oahu from the dynamic layer on top (which disappears if panned or zoomed).&amp;nbsp; If it were projected on the fly, as you suggest it should be and I had hoped it would be, the dynamic Oahu should not have shown in Africa.&amp;nbsp; If I instead use an extent for Oahu on OSM, the OSM Oahu shows, but the dynamic Oahu is not there, again indicating the on-the-fly projecting is not taking place.&lt;BR /&gt;&lt;BR /&gt;I wonder if I need some addtional setting/step to make the on-the-fly projection work.&lt;BR /&gt;&lt;BR /&gt;Is on-the-fly projection of non-first layers expected to work only for tile layers?&amp;nbsp; The OSM layer class is a subclass of the tile class.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://jsfiddle.net/JeffJacobson/3yA7r/"&gt;I've got it running on jsFiddle&lt;/A&gt;&lt;SPAN&gt;. If you zoom in to Hawaii you'll see your layer overlapping the basemap.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2013 16:55:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-open-street-map-layer-and-a-dynamic/m-p/256300#M23769</guid>
      <dc:creator>JeffJacobson</dc:creator>
      <dc:date>2013-01-09T16:55:40Z</dc:date>
    </item>
  </channel>
</rss>

