<?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: Identifying an existing Basemap, to avoid needless replacing. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifying-an-existing-basemap-to-avoid-needless/m-p/193713#M17887</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FYI,&amp;nbsp;it's working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see now that, with 'well known names', portal-items, and direct URL sources, that the matter of 'basemap identity' is not a trivial one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given that, this method of checking identity seems reasonable enough - I guess it would be nice to make it an official feature of the toJSON() methods, to help avoid running into&amp;nbsp;regression issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Jan 2019 11:31:29 GMT</pubDate>
    <dc:creator>NathanSummers1</dc:creator>
    <dc:date>2019-01-10T11:31:29Z</dc:date>
    <item>
      <title>Identifying an existing Basemap, to avoid needless replacing.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifying-an-existing-basemap-to-avoid-needless/m-p/193706#M17880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Situation:&lt;/P&gt;&lt;P&gt;I am writing an app that can load&amp;nbsp;different sets of user-preferences, and&amp;nbsp;that can programatically change the basemap.&lt;/P&gt;&lt;P&gt;I have a function who's job it is to detect the changes needed for the map, and this is called whenever a user changes their layers, basemap, or when user-preferences are loaded.&amp;nbsp; (the point i'm making is that there's no 'user has changed the basemap' event from the basemap widget when my alternate user-preferences are loaded).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to detect that the basemap is not the same as the one in the preferences, and only change the basemap attribute when a difference is detected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm storing a basemap.toJSON() in my user-preferences.&lt;/P&gt;&lt;P&gt;What can I use in that, to correlate to a basemap (that was created from basemap.fromJSON() ) ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2019 11:42:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifying-an-existing-basemap-to-avoid-needless/m-p/193706#M17880</guid>
      <dc:creator>NathanSummers1</dc:creator>
      <dc:date>2019-01-09T11:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying an existing Basemap, to avoid needless replacing.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifying-an-existing-basemap-to-avoid-needless/m-p/193707#M17881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Can you not just add a watch to the maps basemap property (assuming 4.x API since you did not specify)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2019 13:54:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifying-an-existing-basemap-to-avoid-needless/m-p/193707#M17881</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-01-09T13:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying an existing Basemap, to avoid needless replacing.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifying-an-existing-basemap-to-avoid-needless/m-p/193708#M17882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The watch will tell me when the actual map's Basemap is changed.&lt;/P&gt;&lt;P&gt;I'm trying to work out if&amp;nbsp;what I store in my user-preferences data is the Basemap that's already in use on the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you see, I'm trying to &lt;EM&gt;avoid&lt;/EM&gt; changing the map's basemap.&amp;nbsp; But I can't see what I can easily&amp;nbsp;compare in my user-preferences to the on-screen Basemap.&lt;/P&gt;&lt;P&gt;Using the latest 4.10 api.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2019 14:04:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifying-an-existing-basemap-to-avoid-needless/m-p/193708#M17882</guid>
      <dc:creator>NathanSummers1</dc:creator>
      <dc:date>2019-01-09T14:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying an existing Basemap, to avoid needless replacing.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifying-an-existing-basemap-to-avoid-needless/m-p/193709#M17883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;So the maps basemap property give you a string of the basemap name or a basemap object... Can you not use that to compare?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2019 14:06:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifying-an-existing-basemap-to-avoid-needless/m-p/193709#M17883</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-01-09T14:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying an existing Basemap, to avoid needless replacing.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifying-an-existing-basemap-to-avoid-needless/m-p/193710#M17884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It appears the Basemap ID is generated uniquely each time I do a Basemap.fromJSON().&lt;/P&gt;&lt;P&gt;I wouldn't use the Title, that seems fragile.&lt;/P&gt;&lt;P&gt;The Basemap object itself cant be compared to what I store ... I store the Basemap.fromJSON().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think I've tried comparing currentBasemap.toJSON() with my user-preferences storage...&lt;/P&gt;&lt;P&gt;The toJSON method returns a JSON-compatible object (good, it's not a string!), but that makes comparison tricky, because that's a 'deep attribute by attribute object comparison'.&amp;nbsp;&amp;nbsp;Is there no alternative?&amp;nbsp; Would it be reliable -&amp;nbsp;are the layer arrays stored in a predictable order?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2019 14:19:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifying-an-existing-basemap-to-avoid-needless/m-p/193710#M17884</guid>
      <dc:creator>NathanSummers1</dc:creator>
      <dc:date>2019-01-09T14:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying an existing Basemap, to avoid needless replacing.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifying-an-existing-basemap-to-avoid-needless/m-p/193711#M17885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure about the predictability of the order. I am not aware of any alternative,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2019 14:39:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifying-an-existing-basemap-to-avoid-needless/m-p/193711#M17885</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-01-09T14:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying an existing Basemap, to avoid needless replacing.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifying-an-existing-basemap-to-avoid-needless/m-p/193712#M17886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so far Robert - I'll&amp;nbsp;use the 'deep-equals' library and&amp;nbsp;see if I get good results&amp;nbsp;comparing the JSON-ready objects.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2019 14:44:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifying-an-existing-basemap-to-avoid-needless/m-p/193712#M17886</guid>
      <dc:creator>NathanSummers1</dc:creator>
      <dc:date>2019-01-09T14:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying an existing Basemap, to avoid needless replacing.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifying-an-existing-basemap-to-avoid-needless/m-p/193713#M17887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FYI,&amp;nbsp;it's working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see now that, with 'well known names', portal-items, and direct URL sources, that the matter of 'basemap identity' is not a trivial one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given that, this method of checking identity seems reasonable enough - I guess it would be nice to make it an official feature of the toJSON() methods, to help avoid running into&amp;nbsp;regression issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2019 11:31:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifying-an-existing-basemap-to-avoid-needless/m-p/193713#M17887</guid>
      <dc:creator>NathanSummers1</dc:creator>
      <dc:date>2019-01-10T11:31:29Z</dc:date>
    </item>
  </channel>
</rss>

