<?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 How can I construct a map object from a web map in Kotlin? in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-can-i-construct-a-map-object-from-a-web-map-in/m-p/414042#M2826</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd like to use a web map in an Android app built with Runtime SDK Android. I've followed the&lt;A href="https://developers.arcgis.com/android/latest/guide/develop-your-first-map-app-with-kotlin.htm" rel="nofollow noopener noreferrer" target="_blank"&gt; Kotlin tutorial&lt;/A&gt; for getting started which has worked. I've removed the "developer use only" tag by getting a &lt;A href="https://developers.arcgis.com/android/latest/guide/license-your-app.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;license key&lt;/A&gt; (lite). From the docs I see it's possible to add web map (which I've created using ArcPro, shared to AGOL and made sure all data and the web map itself are public.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Runtime SDK Android docs state it's possible to &lt;A href="https://developers.arcgis.com/android/latest/guide/display-a-map.htm#ESRI_SECTION2_4CCB74E11EE04611849F3C0F41D9381C" rel="nofollow noopener noreferrer" target="_blank"&gt;add a web map URL&lt;/A&gt; using the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=""&gt;ArcGISMap map = &lt;SPAN class=""&gt;new&lt;/SPAN&gt; ArcGISMap(&lt;SPAN class=""&gt;"URL/to/webmap"&lt;/SPAN&gt;);&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;To keep it Kotlin I've instead tried to do the following:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #cc7832;"&gt;val &lt;/SPAN&gt;map = ArcGISMap(&lt;SPAN style="color: #6a8759;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fburdgis-esri.maps.arcgis.com%2Fhome%2Fitem.html%3Fid%3D9f65c604ad514295838b94d42911ae2a" target="_blank"&gt;https://burdgis-esri.maps.arcgis.com/home/item.html?id=9f65c604ad514295838b94d42911ae2a&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;)
mapView.&lt;SPAN style="color: #9876aa; font-style: italic;"&gt;map &lt;/SPAN&gt;= map&lt;/PRE&gt;&lt;P&gt;However, this is not working. No map is shown, only a blank space where it should be. Android studio is showing no errors in the build.&lt;/P&gt;&lt;P&gt;No doubt it's something very simple as I'm very new to Kotlin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Update&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Figured it out. I just needed to replace the burdgis-esri with www in the URL as the map is public. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 18:46:19 GMT</pubDate>
    <dc:creator>Oliver_Burdekin</dc:creator>
    <dc:date>2021-12-11T18:46:19Z</dc:date>
    <item>
      <title>How can I construct a map object from a web map in Kotlin?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-can-i-construct-a-map-object-from-a-web-map-in/m-p/414042#M2826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd like to use a web map in an Android app built with Runtime SDK Android. I've followed the&lt;A href="https://developers.arcgis.com/android/latest/guide/develop-your-first-map-app-with-kotlin.htm" rel="nofollow noopener noreferrer" target="_blank"&gt; Kotlin tutorial&lt;/A&gt; for getting started which has worked. I've removed the "developer use only" tag by getting a &lt;A href="https://developers.arcgis.com/android/latest/guide/license-your-app.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;license key&lt;/A&gt; (lite). From the docs I see it's possible to add web map (which I've created using ArcPro, shared to AGOL and made sure all data and the web map itself are public.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Runtime SDK Android docs state it's possible to &lt;A href="https://developers.arcgis.com/android/latest/guide/display-a-map.htm#ESRI_SECTION2_4CCB74E11EE04611849F3C0F41D9381C" rel="nofollow noopener noreferrer" target="_blank"&gt;add a web map URL&lt;/A&gt; using the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=""&gt;ArcGISMap map = &lt;SPAN class=""&gt;new&lt;/SPAN&gt; ArcGISMap(&lt;SPAN class=""&gt;"URL/to/webmap"&lt;/SPAN&gt;);&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;To keep it Kotlin I've instead tried to do the following:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #cc7832;"&gt;val &lt;/SPAN&gt;map = ArcGISMap(&lt;SPAN style="color: #6a8759;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fburdgis-esri.maps.arcgis.com%2Fhome%2Fitem.html%3Fid%3D9f65c604ad514295838b94d42911ae2a" target="_blank"&gt;https://burdgis-esri.maps.arcgis.com/home/item.html?id=9f65c604ad514295838b94d42911ae2a&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;)
mapView.&lt;SPAN style="color: #9876aa; font-style: italic;"&gt;map &lt;/SPAN&gt;= map&lt;/PRE&gt;&lt;P&gt;However, this is not working. No map is shown, only a blank space where it should be. Android studio is showing no errors in the build.&lt;/P&gt;&lt;P&gt;No doubt it's something very simple as I'm very new to Kotlin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Update&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Figured it out. I just needed to replace the burdgis-esri with www in the URL as the map is public. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:46:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-can-i-construct-a-map-object-from-a-web-map-in/m-p/414042#M2826</guid>
      <dc:creator>Oliver_Burdekin</dc:creator>
      <dc:date>2021-12-11T18:46:19Z</dc:date>
    </item>
  </channel>
</rss>

