<?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: Specify Attribute in Java Maps SDK Questions</title>
    <link>https://community.esri.com/t5/java-maps-sdk-questions/specify-attribute/m-p/816#M2</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the simplest answer is to remove unnecessary field from the shapefile schema. Follow this guide: &lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/manage-data/tables/deleting-fields.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/manage-data/tables/deleting-fields.htm"&gt;Deleting fields—Help | ArcGIS for Desktop&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Also, you can try to query shapefile setting output fields in the QueryParameters- that should work too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Feb 2017 08:25:27 GMT</pubDate>
    <dc:creator>nita14</dc:creator>
    <dc:date>2017-02-20T08:25:27Z</dc:date>
    <item>
      <title>Specify Attribute</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/specify-attribute/m-p/815#M1</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;I use the&amp;nbsp;PopupView and&amp;nbsp;PopupDialog to create e a popup from the featureLayer and use&amp;nbsp;setFeature function to display the feature like the picture below.But it will display all the attribute of the feature.I wanna to display the specified attribute.How should I do?In addtion,I use the shapefilefeature table to create the featureLayer.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/326299_pastedImage_1.png" style="width: 620px; height: 434px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2017 06:51:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/specify-attribute/m-p/815#M1</guid>
      <dc:creator>zhenzeng</dc:creator>
      <dc:date>2017-02-20T06:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Specify Attribute</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/specify-attribute/m-p/816#M2</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the simplest answer is to remove unnecessary field from the shapefile schema. Follow this guide: &lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/manage-data/tables/deleting-fields.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/manage-data/tables/deleting-fields.htm"&gt;Deleting fields—Help | ArcGIS for Desktop&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Also, you can try to query shapefile setting output fields in the QueryParameters- that should work too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2017 08:25:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/specify-attribute/m-p/816#M2</guid>
      <dc:creator>nita14</dc:creator>
      <dc:date>2017-02-20T08:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Specify Attribute</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/specify-attribute/m-p/817#M3</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2017 10:38:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/specify-attribute/m-p/817#M3</guid>
      <dc:creator>zhenzeng</dc:creator>
      <dc:date>2017-02-20T10:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Specify Attribute</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/specify-attribute/m-p/818#M4</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Adam,&lt;/P&gt;&lt;P&gt;But I have tried the setoutfiled &lt;SPAN style="background-color: #ffffff; font-size: 14px;"&gt;in the QueryParameters.But it seems to return all the field since the popupview still display all the field.The related code is showed as follows.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 14px;"&gt;callback&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;CallbackListener&amp;lt;FeatureResult&amp;gt; callback=new CallbackListener&amp;lt;FeatureResult&amp;gt;() {&lt;/P&gt;&lt;P&gt;@Override&lt;BR /&gt; public void onError(Throwable e) {&lt;BR /&gt; // JOptionPane.showMessageDialog(contentPane, wrap("Error: "+e.getLocalizedMessage()), "", JOptionPane.ERROR_MESSAGE);&lt;BR /&gt; System.out.println("QUERY ERROR");&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;@Override&lt;BR /&gt; public void onCallback(FeatureResult objs) {&lt;BR /&gt; for (Object objFeature : objs) {&lt;BR /&gt; Feature feature = (Feature) objFeature;&lt;BR /&gt; //System.out.println(feature.getAttributes());&lt;BR /&gt; createPopView(feature);&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;query&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;private final String[] ATTR_NAMES =&lt;BR /&gt; new String[] {"NAME_0", "NAME_1", "NAME_2"};&lt;/P&gt;&lt;P&gt;QueryParameters query = new QueryParameters();&lt;BR /&gt; query.setOutFields(ATTR_NAMES);&lt;/P&gt;&lt;P&gt;shapefileTable_lf.queryFeatures(query,callback);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;function&amp;nbsp;&lt;SPAN style="background-color: #f6f6f6;"&gt;createPopView&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;private void createPopView(Feature feature)&lt;BR /&gt; {&lt;BR /&gt; PopupView contentPanel = PopupView.createAttributesView((String)feature.getAttributeValue("NAME_3"), feature);&lt;BR /&gt; //display feature&lt;BR /&gt; contentPanel.setFeature(map, feature);&lt;BR /&gt; PopupDialog popup = map.createPopup(new JComponent[]{contentPanel}, feature);&lt;BR /&gt; popup.setTitle("水资源情况");&lt;BR /&gt; popup.setVisible(true);&lt;BR /&gt; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/326398_pastedImage_7.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2017 10:57:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/specify-attribute/m-p/818#M4</guid>
      <dc:creator>zhenzeng</dc:creator>
      <dc:date>2017-02-20T10:57:05Z</dc:date>
    </item>
  </channel>
</rss>

