<?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: Trouble to access contents of a feature in Java Maps SDK Questions</title>
    <link>https://community.esri.com/t5/java-maps-sdk-questions/trouble-to-access-contents-of-a-feature/m-p/386304#M1171</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm assuming you can use &lt;A class="link-titled" href="https://www.arcgis.com/home/webmap/viewer.html?webmap=ca8a15ea0bc2413396c322198d50fd1e" title="https://www.arcgis.com/home/webmap/viewer.html?webmap=ca8a15ea0bc2413396c322198d50fd1e"&gt;https://www.arcgis.com/home/webmap/viewer.html?webmap=ca8a15ea0bc2413396c322198d50fd1e&lt;/A&gt; in ArcGISOnline. There you can see About-&amp;gt;More Details&amp;nbsp; which takes you to the WebMap Item in ArcGISOnline; this is &lt;A class="link-titled" href="https://www.arcgis.com/home/item.html?id=ca8a15ea0bc2413396c322198d50fd1e" title="https://www.arcgis.com/home/item.html?id=ca8a15ea0bc2413396c322198d50fd1e"&gt;https://www.arcgis.com/home/item.html?id=ca8a15ea0bc2413396c322198d50fd1e.&lt;/A&gt; Here you will get a link to the &lt;SPAN style="background-color: #ffffff;"&gt;Layers that make up the WebMap.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Mar 2020 10:59:43 GMT</pubDate>
    <dc:creator>GayleYoung</dc:creator>
    <dc:date>2020-03-09T10:59:43Z</dc:date>
    <item>
      <title>Trouble to access contents of a feature</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/trouble-to-access-contents-of-a-feature/m-p/386299#M1166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp;Java Runtime 100.7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;I have trouble with the WebMap which ID is ca8a15ea0bc2413396c322198d50fd1e.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I can access it via&amp;nbsp;AuthenticationManager. I am trying to see the selected feature when I click on a layer, but it seems the IdentifyLayerResult of his particular WebMap do not have the GeoElement necessary to read informations.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Specifically I am trying to get access to this kind of informations:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/484074_pastedImage_1.png" /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;To access to the GeoElement, I am using this code:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;DIV&gt;mapView.setOnMouseClicked(event -&amp;gt; {&lt;BR /&gt; // check for primary or secondary mouse click&lt;BR /&gt; if (event.isStillSincePress() &amp;amp;&amp;amp; event.getButton() == MouseButton.PRIMARY) {&lt;BR /&gt; // create a point from where the user clicked&lt;BR /&gt; Point2D point = new Point2D(event.getX(), event.getY());&lt;P&gt;&lt;/P&gt;// identify the clicked features&lt;BR /&gt; final ListenableFuture&amp;lt;List&amp;lt;IdentifyLayerResult&amp;gt;&amp;gt; results = mapView.identifyLayersAsync(point, 10,&lt;BR /&gt; false, 10);&lt;BR /&gt; results.addDoneListener(() -&amp;gt; {&lt;P&gt;&lt;/P&gt;// System.out.println("Listener");&lt;P&gt;&lt;/P&gt;try {&lt;P&gt;&lt;/P&gt;List&amp;lt;IdentifyLayerResult&amp;gt; ListLayer = results.get();&lt;BR /&gt; int j = 0;&lt;BR /&gt; for (IdentifyLayerResult layer : ListLayer) {&lt;P&gt;&lt;/P&gt;// search the layers for identified features&lt;BR /&gt; List&amp;lt;Feature&amp;gt; features = layer.getElements().stream()&lt;BR /&gt; .filter(geoElement -&amp;gt; geoElement instanceof Feature).map(g -&amp;gt; (Feature) g)&lt;BR /&gt; .collect(Collectors.toList());&lt;P&gt;&lt;/P&gt;// select features&lt;BR /&gt; int FeaturesSize = features.size();&lt;BR /&gt; for (int i = 0; i &amp;lt; FeaturesSize; i++) {&lt;BR /&gt; Feature f = features.get(i);&lt;BR /&gt;// printFeature_Info(f);&lt;BR /&gt; String attributeNamePopUp = "";&lt;BR /&gt; try {&lt;BR /&gt; attributeNamePopUp = layer.getLayerContent().getName();&lt;BR /&gt; } catch (java.lang.NullPointerException e) {&lt;BR /&gt; }&lt;BR /&gt; new ArcGIS_Information_Frame_For_Layer(f.getAttributes(), attributeNamePopUp);&lt;P&gt;&lt;/P&gt;setupGraphicsOverlay();&lt;BR /&gt; List&amp;lt;Graphic&amp;gt; graphics = new ArrayList&amp;lt;&amp;gt;();&lt;BR /&gt; graphics.add(new Graphic(f.getGeometry()));&lt;BR /&gt; graphicsOverlay.getGraphics().addAll(graphics);&lt;BR /&gt; }&lt;BR /&gt; }&lt;P&gt;&lt;/P&gt;} catch (Exception e) {&lt;BR /&gt; e.printStackTrace();&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; }&lt;BR /&gt; });&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adrien.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2020 20:45:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/trouble-to-access-contents-of-a-feature/m-p/386299#M1166</guid>
      <dc:creator>JulienHaccoun</dc:creator>
      <dc:date>2020-03-04T20:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble to access contents of a feature</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/trouble-to-access-contents-of-a-feature/m-p/386300#M1167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adrien, thanks for your question.&lt;/P&gt;&lt;P&gt;It sounds like you have sucessfully Identified the Feature(s) you need. However, I'm not clear if this is a problem with this specifc Webmap or a problem with the type of Fields in the Feature. Do you have your code working for FeatureLayers in other Webmaps? Have a look at `com.esri.arcgisruntime.mapping.view.IdentifyLayerResult.getPopups()` which returns a 'List&amp;lt;Popup&amp;gt;'. This information can be used to create your UI..&amp;nbsp; If you need more control of the specifc popup fields then consider using something like:&lt;/P&gt;&lt;P&gt;```&lt;BR /&gt;&amp;nbsp;Popup popup = new Popup(geoElement);&lt;BR /&gt;&amp;nbsp;List&amp;lt;PopupField&amp;gt; fields = popup.getPopupDefinition().getFields();&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2020 12:12:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/trouble-to-access-contents-of-a-feature/m-p/386300#M1167</guid>
      <dc:creator>GayleYoung</dc:creator>
      <dc:date>2020-03-05T12:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble to access contents of a feature</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/trouble-to-access-contents-of-a-feature/m-p/386301#M1168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Gayle,&lt;/P&gt;&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;My code does work for other WebMap.&lt;/P&gt;&lt;P&gt;I have checked, there are no popups affiliated with this WebMap.&lt;/P&gt;&lt;P&gt;I have used your method to check popups&amp;nbsp;and it gave me&amp;nbsp;no pop up for this webmap and for its sublayers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2020 15:12:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/trouble-to-access-contents-of-a-feature/m-p/386301#M1168</guid>
      <dc:creator>JulienHaccoun</dc:creator>
      <dc:date>2020-03-05T15:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble to access contents of a feature</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/trouble-to-access-contents-of-a-feature/m-p/386302#M1169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you'd have to check that the Fields of those Layers are as your code expects. You can see the source of the data if you go to Item Details-&amp;gt;Layers then access the link displayed. That is &lt;A class="link-titled" href="https://demographics9.arcgis.com/arcgis/rest/services/USA_Demographics_and_Boundaries_2019/MapServer" title="https://demographics9.arcgis.com/arcgis/rest/services/USA_Demographics_and_Boundaries_2019/MapServer"&gt;https://demographics9.arcgis.com/arcgis/rest/services/USA_Demographics_and_Boundaries_2019/MapServer.&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can see that this service has 4 layers called BlockGroup. You will find the Median Houseold income listed there. The other data you see in the ArcGISOnline Popup may be configured specifically for that application and may not be part of the service data.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gayle.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2020 15:29:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/trouble-to-access-contents-of-a-feature/m-p/386302#M1169</guid>
      <dc:creator>GayleYoung</dc:creator>
      <dc:date>2020-03-05T15:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble to access contents of a feature</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/trouble-to-access-contents-of-a-feature/m-p/386303#M1170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do you&amp;nbsp;go to&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;Item Details-&amp;gt;Layers? Is it a website? or attribute of an object?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;And, in the link the gave me, I see this is a MapServer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;With this MapServer, I see, following your direction I can have access to Feature Layer. How do I get the ArcGISMap of these feature layer? Is there a PortalID?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Adrien&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2020 20:42:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/trouble-to-access-contents-of-a-feature/m-p/386303#M1170</guid>
      <dc:creator>JulienHaccoun</dc:creator>
      <dc:date>2020-03-05T20:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble to access contents of a feature</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/trouble-to-access-contents-of-a-feature/m-p/386304#M1171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm assuming you can use &lt;A class="link-titled" href="https://www.arcgis.com/home/webmap/viewer.html?webmap=ca8a15ea0bc2413396c322198d50fd1e" title="https://www.arcgis.com/home/webmap/viewer.html?webmap=ca8a15ea0bc2413396c322198d50fd1e"&gt;https://www.arcgis.com/home/webmap/viewer.html?webmap=ca8a15ea0bc2413396c322198d50fd1e&lt;/A&gt; in ArcGISOnline. There you can see About-&amp;gt;More Details&amp;nbsp; which takes you to the WebMap Item in ArcGISOnline; this is &lt;A class="link-titled" href="https://www.arcgis.com/home/item.html?id=ca8a15ea0bc2413396c322198d50fd1e" title="https://www.arcgis.com/home/item.html?id=ca8a15ea0bc2413396c322198d50fd1e"&gt;https://www.arcgis.com/home/item.html?id=ca8a15ea0bc2413396c322198d50fd1e.&lt;/A&gt; Here you will get a link to the &lt;SPAN style="background-color: #ffffff;"&gt;Layers that make up the WebMap.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2020 10:59:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/trouble-to-access-contents-of-a-feature/m-p/386304#M1171</guid>
      <dc:creator>GayleYoung</dc:creator>
      <dc:date>2020-03-09T10:59:43Z</dc:date>
    </item>
  </channel>
</rss>

