<?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: esri/basemap baseLayers collection in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-basemap-baselayers-collection/m-p/583334#M54484</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value you have passed for the baseLayers is wrong. You either need to send an instance of layer or object which it can identify as layer. Right now it might not be able identify which type of layer it is by just url.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example for creating custom basemap.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/basemap-custom/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/basemap-custom/index.html"&gt;Custom Basemap | ArcGIS API for JavaScript 4.2&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this was helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Feb 2017 16:11:47 GMT</pubDate>
    <dc:creator>thejuskambi</dc:creator>
    <dc:date>2017-02-15T16:11:47Z</dc:date>
    <item>
      <title>esri/basemap baseLayers collection</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-basemap-baselayers-collection/m-p/583333#M54483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am in the process of building a custom web app that I have working properly using the JSAPI v 3.19. This is my first experience with the 4.2 version. &amp;nbsp;I can not find examples of how to properly build a new Basemap in the 4.2 docs.&lt;/P&gt;&lt;P&gt;When I replace the reference to customBaseMap in the Map object with "hybrid" it works fine as it is using a basemap from AGOL. &amp;nbsp;When I reference customeBaseMap in the Map object I get a blank map. &amp;nbsp;When I use FireBug or the IE Developer tools I get no error. &amp;nbsp;Attached is the full code. &amp;nbsp;Below is a snip of the JS:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script&amp;gt;&lt;BR /&gt; require([&lt;BR /&gt; "esri/Map",&lt;BR /&gt; "esri/views/MapView",&lt;BR /&gt; "esri/Basemap",&lt;BR /&gt; "dojo/domReady!"&lt;BR /&gt; ],&lt;BR /&gt; function(&lt;BR /&gt; Map, MapView,Basemap&lt;BR /&gt; ) {&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var imageURL = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Ffirstmap.gis.delaware.gov%2Farcgis%2Frest%2Fservices%2FDE_Imagery%2FDE_Imagery_2012%2FImageServer" rel="nofollow" target="_blank"&gt;http://firstmap.gis.delaware.gov/arcgis/rest/services/DE_Imagery/DE_Imagery_2012/ImageServer&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var labelURL = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Ffirstmap.gis.delaware.gov%2Farcgis%2Frest%2Fservices%2FBaseMap%2FDE_AerialCache%2FMapServer" rel="nofollow" target="_blank"&gt;http://firstmap.gis.delaware.gov/arcgis/rest/services/BaseMap/DE_AerialCache/MapServer&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;var customBasemap = new Basemap({&lt;BR /&gt; baseLayers: [&lt;BR /&gt; { url: imageURL },&lt;BR /&gt; { url: labelURL }&lt;BR /&gt; ],&lt;BR /&gt; title: "Satellite",&lt;BR /&gt; id: "myMap"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var map = new Map({&lt;BR /&gt; basemap: customBasemap&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var view = new MapView({&lt;BR /&gt; container: "viewDiv",&lt;BR /&gt; map: map,&lt;BR /&gt; extent: {&amp;nbsp;&lt;BR /&gt; xmin: -8444782,&lt;BR /&gt; ymin: 4634522,&lt;BR /&gt; xmax: -8360273,&lt;BR /&gt; ymax: 4853595,&lt;BR /&gt; spatialReference: 102100&lt;BR /&gt; }&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;});&lt;BR /&gt; &amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone run into this before or know if some solid documentation on how to build a collection of custom basemaps?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2017 15:47:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-basemap-baselayers-collection/m-p/583333#M54483</guid>
      <dc:creator>MichaelTownshend</dc:creator>
      <dc:date>2017-02-15T15:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: esri/basemap baseLayers collection</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-basemap-baselayers-collection/m-p/583334#M54484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value you have passed for the baseLayers is wrong. You either need to send an instance of layer or object which it can identify as layer. Right now it might not be able identify which type of layer it is by just url.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example for creating custom basemap.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/basemap-custom/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/basemap-custom/index.html"&gt;Custom Basemap | ArcGIS API for JavaScript 4.2&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this was helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2017 16:11:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-basemap-baselayers-collection/m-p/583334#M54484</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2017-02-15T16:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: esri/basemap baseLayers collection</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-basemap-baselayers-collection/m-p/583335#M54485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I get what you are saying... My method in the attached example does work using 3.19 so this is a little different.&amp;nbsp; I tried creating 2 instances of a&amp;nbsp;TileLayer and then adding them to the baseLayers property of the Basemap object.&amp;nbsp; The map still does not display and I still do not get errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-family: Consolas; font-size: small;"&gt;script&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;require([&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;"esri/Map"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;"esri/views/MapView"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;"esri/layers/TileLayer"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;"esri/Basemap"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;"dojo/domReady!"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;],&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Map, MapView, Basemap, TileLayer&lt;/P&gt;&lt;P&gt;) {&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; imageLayer = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; TileLayer({&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; url: &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Ffirstmap.gis.delaware.gov%2Farcgis%2Frest%2Fservices%2FDE_Imagery%2FDE_Imagery_2012%2FImageServer" rel="nofollow" target="_blank"&gt;http://firstmap.gis.delaware.gov/arcgis/rest/services/DE_Imagery/DE_Imagery_2012/ImageServer&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; labelLayer = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; TileLayer({&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; url: &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Ffirstmap.gis.delaware.gov%2Farcgis%2Frest%2Fservices%2FBaseMap%2FDE_AerialCache%2FMapServer" rel="nofollow" target="_blank"&gt;http://firstmap.gis.delaware.gov/arcgis/rest/services/BaseMap/DE_AerialCache/MapServer&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; customBasemap = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; Basemap({&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;baseLayers: [imageLayer, labelLayer],&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; title: &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;"Satellite"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; id: &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;"myMap"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; map = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; Map({&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;basemap: customBasemap&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; view = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; MapView({&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; container: &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;"viewDiv"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;map: map,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; extent: { &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: small; font-family: Consolas;"&gt;// autocasts as new Extent()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;xmin: -8444782,&lt;/P&gt;&lt;P&gt;ymin: 4634522,&lt;/P&gt;&lt;P&gt;xmax: -8360273,&lt;/P&gt;&lt;P&gt;ymax: 4853595,&lt;/P&gt;&lt;P&gt;spatialReference: 102100&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: small; font-family: Consolas;"&gt;script&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2017 16:37:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-basemap-baselayers-collection/m-p/583335#M54485</guid>
      <dc:creator>MichaelTownshend</dc:creator>
      <dc:date>2017-02-15T16:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: esri/basemap baseLayers collection</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-basemap-baselayers-collection/m-p/583336#M54486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Disregard my last response...&amp;nbsp; Your recommendation worked.&amp;nbsp; Basemap and TileLayer were in the wrong order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2017 18:59:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-basemap-baselayers-collection/m-p/583336#M54486</guid>
      <dc:creator>MichaelTownshend</dc:creator>
      <dc:date>2017-02-15T18:59:05Z</dc:date>
    </item>
  </channel>
</rss>

