<?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: Issue viewing a Shapefile in Java Maps SDK Questions</title>
    <link>https://community.esri.com/t5/java-maps-sdk-questions/issue-viewing-a-shapefile/m-p/148571#M425</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Mark, it helps a lot.&lt;/P&gt;&lt;P&gt;How do you alter the shapefile to delete an attribute?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jun 2020 13:55:37 GMT</pubDate>
    <dc:creator>JulienHaccoun</dc:creator>
    <dc:date>2020-06-09T13:55:37Z</dc:date>
    <item>
      <title>Issue viewing a Shapefile</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/issue-viewing-a-shapefile/m-p/148569#M423</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 have downloaded the shapefile from this page:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://gis-mdc.opendata.arcgis.com/datasets/block-group-low-moderate-2000-1?geometry=-82.699%2C24.877%2C-77.472%2C25.746" title="https://gis-mdc.opendata.arcgis.com/datasets/block-group-low-moderate-2000-1?geometry=-82.699%2C24.877%2C-77.472%2C25.746"&gt;Block Group Low Moderate 2000&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to load it to my map by doing that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;File shapefile = new File(System.getProperty("data.dir"), "address");&lt;BR /&gt; ShapefileFeatureTable shapefileFeatureTable = new ShapefileFeatureTable(shapefile.getAbsolutePath());&lt;/P&gt;&lt;P&gt;// use the shapefile feature table to create a feature layer&lt;BR /&gt; FeatureLayer layer = new FeatureLayer(shapefileFeatureTable);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;layer.addDoneLoadingListener(() -&amp;gt; {&lt;BR /&gt; System.out.println("Layer Loading : " + layer.getLoadStatus());&lt;BR /&gt; if (layer.getLoadStatus() == LoadStatus.LOADED) {&lt;BR /&gt; mapView.setViewpoint(new Viewpoint(layer.getFullExtent()));&lt;BR /&gt; } else {&lt;BR /&gt; Platform.runLater(new Runnable() {&lt;BR /&gt; @Override&lt;BR /&gt; public void run() {&lt;BR /&gt; ArcGISRuntimeException loadError = layer.getLoadError();&lt;BR /&gt;&lt;BR /&gt; Throwable Cause = loadError.getCause();&lt;BR /&gt; String alertMessage = "(" + layerId + ") '" + portalItemID.title + "' Layer Error : "&lt;BR /&gt; + loadError.getMessage() + (Cause == null ? "" : (" - Cause: " + Cause.getMessage()));&lt;BR /&gt; loadError.printStackTrace();&lt;BR /&gt; if(Cause != null)&lt;BR /&gt; Cause.printStackTrace();&lt;BR /&gt;&lt;BR /&gt; Alert alert = new Alert(AlertType.ERROR, alertMessage);&lt;BR /&gt; alert.show();&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; layer.addLoadStatusChangedListener(new LoadStatusChangedListener() {&lt;BR /&gt; @Override&lt;BR /&gt; public void loadStatusChanged(LoadStatusChangedEvent loadStatusChangedEvent) {&lt;BR /&gt; System.out.println("(" + layerId + ") '" + portalItemID.title + "' LoadStatusChangedListener : "+ loadStatusChangedEvent.getNewLoadStatus().name());&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; mapView.getMap().getOperationalLayers().add(layer);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, it doesn't work. I got the following message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ArcGISRuntimeException: The field already exists.: FID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It also says:&lt;/P&gt;&lt;P&gt;Licensed For Developer Use Only&lt;/P&gt;&lt;P&gt;Would that be the cause?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2020 21:42:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/issue-viewing-a-shapefile/m-p/148569#M423</guid>
      <dc:creator>JulienHaccoun</dc:creator>
      <dc:date>2020-06-08T21:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Issue viewing a Shapefile</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/issue-viewing-a-shapefile/m-p/148570#M424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your code is basically okay, but there is something odd with that shapefile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I opened it up in ArcMap and looked at the attributes.&amp;nbsp; It has FID which I would expect, but it also has FID_1.&amp;nbsp; I deleted the attribute completely from the shapefile and this fixed the issue - it loaded fine!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/495989_pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not a shapfile expert, but I'll ask someone to comment on what might have happened here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd also be tempted to ask the data provider what the purpose of the FID_1 attribute is.&amp;nbsp; From the description given of the data I don't believe it should be there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You also ask why the console has "&lt;SPAN style="background-color: #ffffff;"&gt;Licensed For Developer Use Only".&amp;nbsp; This is because you have not licensed your application for deployment.&amp;nbsp; ArcGIS Runtime is free to use as a developer, but there might be a cost associated with deployments.&amp;nbsp; Take a look at&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/java/latest/guide/license-your-app.htm" title="https://developers.arcgis.com/java/latest/guide/license-your-app.htm"&gt;License your app—ArcGIS Runtime SDK for Java | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Does this help?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2020 09:45:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/issue-viewing-a-shapefile/m-p/148570#M424</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2020-06-09T09:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Issue viewing a Shapefile</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/issue-viewing-a-shapefile/m-p/148571#M425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Mark, it helps a lot.&lt;/P&gt;&lt;P&gt;How do you alter the shapefile to delete an attribute?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2020 13:55:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/issue-viewing-a-shapefile/m-p/148571#M425</guid>
      <dc:creator>JulienHaccoun</dc:creator>
      <dc:date>2020-06-09T13:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Issue viewing a Shapefile</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/issue-viewing-a-shapefile/m-p/148572#M426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have ArcMap or ArcGIS Pro you can edit it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2020 15:53:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/issue-viewing-a-shapefile/m-p/148572#M426</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2020-06-09T15:53:16Z</dc:date>
    </item>
  </channel>
</rss>

