<?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 basemap selection using basemapgallery dijit in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-selection-using-basemapgallery-dijit/m-p/279505#M25800</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Few questions about BaseMap and BaseMapGallery dijit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using BaseMapGallery to retrieve all basemaps available on ArcGIS.com following way. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;&amp;nbsp; var vBasemapGallery = new BasemapGallery({&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; showArcGISBasemaps: true,&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map: myMap&lt;/P&gt;&lt;P&gt;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once all basemaps are loaded, I show them in one popup of my application. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vBasemapGallery.on('load', function() {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //here I open up the popup of my code, display all basemaps and handle selection of the basemap. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // I write callback function here to handle the selection&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="line-height: 1.5;"&gt;},&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;I receive the selected basemap item in my callback function once user switches to the another basemap. So far everything is good. Now, questions here are:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;1) Is it okay to use following code in the callback function?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;vBasemapGallery.map.setBasemap(selectedbasemap); //e.g. topo, streets, ocean etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;2) BaseMapGallery handles this event automatically if the dijit is used as it is. How this is going to be different than #1 here? I looked at the obfuscated code and it looks like handling few validations, calculations etc. If I do setBaseMap as mentioned in #1 then will that be buggy code?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;3) When I get all basemaps from ArcGIS.com, it doesn't have any id that can give values like 'streets', 'topo' etc. How can we know based on the object that the selected basemap is 'streets' let's say. Should we compare with the Title? Title is in English so, is it going to be the same always? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Apr 2015 19:18:19 GMT</pubDate>
    <dc:creator>BhavinSanghani</dc:creator>
    <dc:date>2015-04-13T19:18:19Z</dc:date>
    <item>
      <title>basemap selection using basemapgallery dijit</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-selection-using-basemapgallery-dijit/m-p/279505#M25800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Few questions about BaseMap and BaseMapGallery dijit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using BaseMapGallery to retrieve all basemaps available on ArcGIS.com following way. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;&amp;nbsp; var vBasemapGallery = new BasemapGallery({&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; showArcGISBasemaps: true,&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map: myMap&lt;/P&gt;&lt;P&gt;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once all basemaps are loaded, I show them in one popup of my application. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vBasemapGallery.on('load', function() {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //here I open up the popup of my code, display all basemaps and handle selection of the basemap. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // I write callback function here to handle the selection&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="line-height: 1.5;"&gt;},&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;I receive the selected basemap item in my callback function once user switches to the another basemap. So far everything is good. Now, questions here are:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;1) Is it okay to use following code in the callback function?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;vBasemapGallery.map.setBasemap(selectedbasemap); //e.g. topo, streets, ocean etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;2) BaseMapGallery handles this event automatically if the dijit is used as it is. How this is going to be different than #1 here? I looked at the obfuscated code and it looks like handling few validations, calculations etc. If I do setBaseMap as mentioned in #1 then will that be buggy code?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;3) When I get all basemaps from ArcGIS.com, it doesn't have any id that can give values like 'streets', 'topo' etc. How can we know based on the object that the selected basemap is 'streets' let's say. Should we compare with the Title? Title is in English so, is it going to be the same always? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 19:18:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/basemap-selection-using-basemapgallery-dijit/m-p/279505#M25800</guid>
      <dc:creator>BhavinSanghani</dc:creator>
      <dc:date>2015-04-13T19:18:19Z</dc:date>
    </item>
  </channel>
</rss>

