<?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 Add a Feature to the ShapefileFeatureTable, how do I get it to show up on the map? in Kotlin Maps SDK Questions</title>
    <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/add-a-feature-to-the-shapefilefeaturetable-how-do/m-p/1345910#M269</link>
    <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Here&lt;/SPAN&gt;&lt;SPAN&gt; is my code, the problem now is that &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; the shp originally has &lt;/SPAN&gt;&lt;SPAN&gt;Feature&lt;/SPAN&gt;&lt;SPAN&gt; in it it will show up properly, but &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; the shp is empty it won&lt;/SPAN&gt;&lt;SPAN&gt;'t show up and has to be restarted.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;shapefileFeatureTable.load().onSuccess {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;val feature =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;shapefileFeatureTable.createFeature(attr, lastPatchSurfaceGraphic!!.geometry)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;shapefileFeatureTable.addFeature(feature).onSuccess {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;val featureLayer = FeatureLayer.createWithFeatureTable(shapefileFeatureTable)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if (patchType == 1) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;featureLayer.renderer = Config.defaultPointerRender&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;} else {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;featureLayer.renderer = Config.defaultPatchRender&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;map!!.operationalLayers.add(featureLayer)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}.onFailure {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;it.printStackTrace()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ToastUtils.show("添加失败,${it.message}")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Sun, 05 Nov 2023 08:50:15 GMT</pubDate>
    <dc:creator>jokerjoker</dc:creator>
    <dc:date>2023-11-05T08:50:15Z</dc:date>
    <item>
      <title>Add a Feature to the ShapefileFeatureTable, how do I get it to show up on the map?</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/add-a-feature-to-the-shapefilefeaturetable-how-do/m-p/1345910#M269</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Here&lt;/SPAN&gt;&lt;SPAN&gt; is my code, the problem now is that &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; the shp originally has &lt;/SPAN&gt;&lt;SPAN&gt;Feature&lt;/SPAN&gt;&lt;SPAN&gt; in it it will show up properly, but &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; the shp is empty it won&lt;/SPAN&gt;&lt;SPAN&gt;'t show up and has to be restarted.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;shapefileFeatureTable.load().onSuccess {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;val feature =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;shapefileFeatureTable.createFeature(attr, lastPatchSurfaceGraphic!!.geometry)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;shapefileFeatureTable.addFeature(feature).onSuccess {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;val featureLayer = FeatureLayer.createWithFeatureTable(shapefileFeatureTable)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if (patchType == 1) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;featureLayer.renderer = Config.defaultPointerRender&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;} else {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;featureLayer.renderer = Config.defaultPatchRender&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;map!!.operationalLayers.add(featureLayer)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}.onFailure {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;it.printStackTrace()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ToastUtils.show("添加失败,${it.message}")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 05 Nov 2023 08:50:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/add-a-feature-to-the-shapefilefeaturetable-how-do/m-p/1345910#M269</guid>
      <dc:creator>jokerjoker</dc:creator>
      <dc:date>2023-11-05T08:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Add a Feature to the ShapefileFeatureTable, how do I get it to show up on the map?</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/add-a-feature-to-the-shapefilefeaturetable-how-do/m-p/1346501#M273</link>
      <description>&lt;P&gt;If there was a feature in the shp, it will be shown, if not, you need to reboot&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 03:58:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/add-a-feature-to-the-shapefilefeaturetable-how-do/m-p/1346501#M273</guid>
      <dc:creator>jokerjoker</dc:creator>
      <dc:date>2023-11-07T03:58:53Z</dc:date>
    </item>
  </channel>
</rss>

