<?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 to Display a Legend from Webmap in MapView? in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-display-a-legend-from-webmap-in-mapview/m-p/85205#M645</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe there is an obvious answer that I missed, but I'm wondering how can I display a legend from a web map?&amp;nbsp; I was looking at &lt;A href="https://github.com/Esri/arcgis-runtime-samples-android/blob/master/MapLegend/src/main/java/com/arcgis/android/samples/maps/maplegend/LegendDialogFragment.java"&gt;Esri's GitHub Android Sample for displaying a legend&lt;/A&gt;, but this is using a Dynamic Service Layer, not a webmap.&amp;nbsp; I'm planning on displaying the legend the same way through a Fragment, but the &lt;A href="https://developers.arcgis.com/android/api-reference/reference/com/esri/android/map/ags/ArcGISDynamicMapServiceLayer.html"&gt;ArcGISDynamicMapServiceLayer&lt;/A&gt; has a method to &lt;A href="https://developers.arcgis.com/android/api-reference/reference/com/esri/android/map/ags/ArcGISDynamicMapServiceLayer.html#retrieveLegendInfo()"&gt;retrieve the legend info&lt;/A&gt;.&amp;nbsp; I am not seeing anything like this to call from a MapView.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am instantiating a MapView using a url like this to load the WebMap:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;map &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;MapView(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;this&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000; font-weight: bold;"&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%2Fwww.arcgis.com%2Fhome%2Fitem.html%3Fid%3Dcaee4b7fdf5c49c285995b5d1b25e123" rel="nofollow" target="_blank"&gt;http://www.arcgis.com/home/item.html?id=caee4b7fdf5c49c285995b5d1b25e123&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000; font-weight: bold;"&gt;""&lt;/SPAN&gt;, &lt;SPAN style="color: #008000; font-weight: bold;"&gt;""&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know I can iterate through the map layers, but I couldn't see anything in a Layer either that would give me a renderer or legend info (besides whether or not there is a legend item for it).&amp;nbsp; I feel like I'm making this harder than it needs to be...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Apr 2016 05:13:21 GMT</pubDate>
    <dc:creator>CalebMackey</dc:creator>
    <dc:date>2016-04-18T05:13:21Z</dc:date>
    <item>
      <title>How to Display a Legend from Webmap in MapView?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-display-a-legend-from-webmap-in-mapview/m-p/85205#M645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe there is an obvious answer that I missed, but I'm wondering how can I display a legend from a web map?&amp;nbsp; I was looking at &lt;A href="https://github.com/Esri/arcgis-runtime-samples-android/blob/master/MapLegend/src/main/java/com/arcgis/android/samples/maps/maplegend/LegendDialogFragment.java"&gt;Esri's GitHub Android Sample for displaying a legend&lt;/A&gt;, but this is using a Dynamic Service Layer, not a webmap.&amp;nbsp; I'm planning on displaying the legend the same way through a Fragment, but the &lt;A href="https://developers.arcgis.com/android/api-reference/reference/com/esri/android/map/ags/ArcGISDynamicMapServiceLayer.html"&gt;ArcGISDynamicMapServiceLayer&lt;/A&gt; has a method to &lt;A href="https://developers.arcgis.com/android/api-reference/reference/com/esri/android/map/ags/ArcGISDynamicMapServiceLayer.html#retrieveLegendInfo()"&gt;retrieve the legend info&lt;/A&gt;.&amp;nbsp; I am not seeing anything like this to call from a MapView.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am instantiating a MapView using a url like this to load the WebMap:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;map &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;MapView(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;this&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000; font-weight: bold;"&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%2Fwww.arcgis.com%2Fhome%2Fitem.html%3Fid%3Dcaee4b7fdf5c49c285995b5d1b25e123" rel="nofollow" target="_blank"&gt;http://www.arcgis.com/home/item.html?id=caee4b7fdf5c49c285995b5d1b25e123&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000; font-weight: bold;"&gt;""&lt;/SPAN&gt;, &lt;SPAN style="color: #008000; font-weight: bold;"&gt;""&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know I can iterate through the map layers, but I couldn't see anything in a Layer either that would give me a renderer or legend info (besides whether or not there is a legend item for it).&amp;nbsp; I feel like I'm making this harder than it needs to be...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Apr 2016 05:13:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-display-a-legend-from-webmap-in-mapview/m-p/85205#M645</guid>
      <dc:creator>CalebMackey</dc:creator>
      <dc:date>2016-04-18T05:13:21Z</dc:date>
    </item>
  </channel>
</rss>

