<?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: Add features with GeometryTyp polygon in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-features-with-geometrytyp-polygon/m-p/272187#M1776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/geometry/Polygon.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Polygon&lt;/A&gt; inherits from &lt;A href="https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/geometry/Geometry.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Geometry&lt;/A&gt;&amp;nbsp;so you can cast your geometry to a polygon once you're happy it is a polygon. Use code looking something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #cc7832;"&gt;if &lt;/SPAN&gt;(sketchGeometry.getGeometryType() == GeometryType.&lt;SPAN style="color: #9876aa;"&gt;POLYGON&lt;/SPAN&gt;) {
  Polygon polygon = (Polygon) sketchGeometry&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;}&lt;/PRE&gt;&lt;P&gt;or&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #cc7832;"&gt;if &lt;/SPAN&gt;(sketchGeometry &lt;SPAN style="color: #cc7832;"&gt;instanceof &lt;/SPAN&gt;Polygon) {
  Polygon polygon = (Polygon) sketchGeometry&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;}&lt;/PRE&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trevor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 13:17:37 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-12-11T13:17:37Z</dc:date>
    <item>
      <title>Add features with GeometryTyp polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-features-with-geometrytyp-polygon/m-p/272184#M1773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any example for adding features with GeometryTyp polygon in combination with SketchEditor?&lt;/P&gt;&lt;P&gt;I studied this example with GeometryTyp point:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/android/latest/java/sample-code/add-features-feature-service/" title="https://developers.arcgis.com/android/latest/java/sample-code/add-features-feature-service/"&gt;Add features (Feature Service) | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;, but I've not found a comparable example for &lt;SPAN&gt;GeometryTyp&amp;nbsp;&lt;/SPAN&gt;polygon.&lt;/P&gt;&lt;PRE class="" data-placeholder="Übersetzung" dir="ltr" style="color: #222222; background-color: transparent; border: none; font-size: 28px; margin: -2px 0px; padding: 2px 0.14em 2px 0px;"&gt;&lt;SPAN lang="en"&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2019 15:54:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-features-with-geometrytyp-polygon/m-p/272184#M1773</guid>
      <dc:creator>MagdalenaOchsenbauer</dc:creator>
      <dc:date>2019-12-10T15:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Add features with GeometryTyp polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-features-with-geometrytyp-polygon/m-p/272185#M1774</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;The &lt;A href="https://github.com/Esri/arcgis-runtime-samples-android/tree/master/java/sketch-editor"&gt;sketch editor&lt;/A&gt;&amp;nbsp;samples does exactly that!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Trevor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2019 16:09:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-features-with-geometrytyp-polygon/m-p/272185#M1774</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-12-10T16:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add features with GeometryTyp polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-features-with-geometrytyp-polygon/m-p/272186#M1775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for your reply, but&amp;nbsp;how can I&amp;nbsp;convert the sketchGeometry to a Polygon to save it in a FeatureLayer?&lt;/P&gt;&lt;PRE style="color: #a9b7c6; background-color: #2b2b2b; font-size: 9pt;"&gt;Geometry sketchGeometry = &lt;SPAN style="color: #9876aa;"&gt;mSketchEditor&lt;/SPAN&gt;.getGeometry()&lt;SPAN style="color: #cc7832;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2019 16:38:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-features-with-geometrytyp-polygon/m-p/272186#M1775</guid>
      <dc:creator>MagdalenaOchsenbauer</dc:creator>
      <dc:date>2019-12-10T16:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Add features with GeometryTyp polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-features-with-geometrytyp-polygon/m-p/272187#M1776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/geometry/Polygon.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Polygon&lt;/A&gt; inherits from &lt;A href="https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/geometry/Geometry.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Geometry&lt;/A&gt;&amp;nbsp;so you can cast your geometry to a polygon once you're happy it is a polygon. Use code looking something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #cc7832;"&gt;if &lt;/SPAN&gt;(sketchGeometry.getGeometryType() == GeometryType.&lt;SPAN style="color: #9876aa;"&gt;POLYGON&lt;/SPAN&gt;) {
  Polygon polygon = (Polygon) sketchGeometry&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;}&lt;/PRE&gt;&lt;P&gt;or&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #cc7832;"&gt;if &lt;/SPAN&gt;(sketchGeometry &lt;SPAN style="color: #cc7832;"&gt;instanceof &lt;/SPAN&gt;Polygon) {
  Polygon polygon = (Polygon) sketchGeometry&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;}&lt;/PRE&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trevor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:17:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-features-with-geometrytyp-polygon/m-p/272187#M1776</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T13:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Add features with GeometryTyp polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-features-with-geometrytyp-polygon/m-p/272188#M1777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much! It's solved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2019 10:46:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-features-with-geometrytyp-polygon/m-p/272188#M1777</guid>
      <dc:creator>MagdalenaOchsenbauer</dc:creator>
      <dc:date>2019-12-11T10:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Add features with GeometryTyp polygon</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-features-with-geometrytyp-polygon/m-p/1260471#M5984</link>
      <description>&lt;P&gt;How to fix this problem?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 14:55:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-features-with-geometrytyp-polygon/m-p/1260471#M5984</guid>
      <dc:creator>novruzjaf</dc:creator>
      <dc:date>2023-02-22T14:55:58Z</dc:date>
    </item>
  </channel>
</rss>

