<?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: mapviewhelper addPolygonGraphic !? in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/mapviewhelper-addpolygongraphic/m-p/84649#M640</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe this is a duplicate of &lt;A href="https://community.esri.com/thread/180754"&gt;How do i create polygon using mapviewhelper ?&lt;/A&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Aug 2016 13:29:09 GMT</pubDate>
    <dc:creator>AlexanderNohe1</dc:creator>
    <dc:date>2016-08-01T13:29:09Z</dc:date>
    <item>
      <title>mapviewhelper addPolygonGraphic !?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/mapviewhelper-addpolygongraphic/m-p/84648#M639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to create polygon using mapviewhelper addPolygonGraphic !?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2016 12:03:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/mapviewhelper-addpolygongraphic/m-p/84648#M639</guid>
      <dc:creator>MohamedEzzerI</dc:creator>
      <dc:date>2016-07-29T12:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: mapviewhelper addPolygonGraphic !?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/mapviewhelper-addpolygongraphic/m-p/84649#M640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe this is a duplicate of &lt;A href="https://community.esri.com/thread/180754"&gt;How do i create polygon using mapviewhelper ?&lt;/A&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2016 13:29:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/mapviewhelper-addpolygongraphic/m-p/84649#M640</guid>
      <dc:creator>AlexanderNohe1</dc:creator>
      <dc:date>2016-08-01T13:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: mapviewhelper addPolygonGraphic !?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/mapviewhelper-addpolygongraphic/m-p/84650#M641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A href="https://community.esri.com/migrated-users/222837" target="_blank"&gt;Mohamed EzzerI&lt;/A&gt;​,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to get the feature to draw in Casablanca using the following snippet:&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;package &lt;/SPAN&gt;com.arcgis.androidsupportcases.addpolygongraphic&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;import &lt;/SPAN&gt;android.graphics.Color&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;import &lt;/SPAN&gt;android.support.v7.app.AppCompatActivity&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;import &lt;/SPAN&gt;android.os.Bundle&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;import &lt;/SPAN&gt;android.util.Log&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;import &lt;/SPAN&gt;com.esri.android.map.MapView&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;import &lt;/SPAN&gt;com.esri.android.map.event.OnStatusChangedListener&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;import &lt;/SPAN&gt;com.esri.android.toolkit.map.MapViewHelper&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;public class &lt;/SPAN&gt;MainActivity &lt;SPAN style="color: #cc7832;"&gt;extends &lt;/SPAN&gt;AppCompatActivity {

&amp;nbsp; MapView &lt;SPAN style="color: #9876aa;"&gt;mapView&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #bbb529;"&gt;@Override &lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;protected void &lt;/SPAN&gt;&lt;SPAN style="color: #ffc66d;"&gt;onCreate&lt;/SPAN&gt;(Bundle savedInstanceState) {
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #cc7832;"&gt;super&lt;/SPAN&gt;.onCreate(savedInstanceState)&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;setContentView(R.layout.&lt;SPAN style="color: #9876aa; font-style: italic;"&gt;activity_main&lt;/SPAN&gt;)&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;mapView &lt;/SPAN&gt;= (MapView) findViewById(R.id.&lt;SPAN style="color: #9876aa; font-style: italic;"&gt;map&lt;/SPAN&gt;)&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;mapView&lt;/SPAN&gt;.setOnStatusChangedListener(&lt;SPAN style="color: #cc7832;"&gt;new &lt;/SPAN&gt;OnStatusChangedListener() {
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #bbb529;"&gt;@Override &lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;public void &lt;/SPAN&gt;&lt;SPAN style="color: #ffc66d;"&gt;onStatusChanged&lt;/SPAN&gt;(Object o&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;STATUS status) {
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #cc7832;"&gt;if &lt;/SPAN&gt;(status == STATUS.&lt;SPAN style="color: #9876aa; font-style: italic;"&gt;INITIALIZED&lt;/SPAN&gt;) {
&amp;nbsp; MapViewHelper mapViewHelper = &lt;SPAN style="color: #cc7832;"&gt;new &lt;/SPAN&gt;MapViewHelper(&lt;SPAN style="color: #9876aa;"&gt;mapView&lt;/SPAN&gt;)&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp; double&lt;/SPAN&gt;[][] latLon = &lt;SPAN style="color: #cc7832;"&gt;new double&lt;/SPAN&gt;[][] {{
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #6897bb;"&gt;33.599389&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;-&lt;SPAN style="color: #6897bb;"&gt;7.610728
&lt;/SPAN&gt;&lt;SPAN style="color: #6897bb;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;SPAN style="color: #cc7832;"&gt;,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #6897bb;"&gt;33.599985&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;-&lt;SPAN style="color: #6897bb;"&gt;7.597180
&lt;/SPAN&gt;&lt;SPAN style="color: #6897bb;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;SPAN style="color: #cc7832;"&gt;,
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #6897bb;"&gt;33.588879&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;-&lt;SPAN style="color: #6897bb;"&gt;7.617027
&lt;/SPAN&gt;&lt;SPAN style="color: #6897bb;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}
&amp;nbsp; }&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp; int &lt;/SPAN&gt;graphic = mapViewHelper.addPolygonGraphic(latLon&lt;SPAN style="color: #cc7832;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"pol_t"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"pol_st"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;""&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;Color.&lt;SPAN style="color: #9876aa; font-style: italic;"&gt;GREEN&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;Color.&lt;SPAN style="color: #9876aa; font-style: italic;"&gt;DKGRAY&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #6897bb;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6897bb;"&gt;0&lt;/SPAN&gt;)&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Log.&lt;SPAN style="font-style: italic;"&gt;e&lt;/SPAN&gt;(&lt;SPAN style="color: #6a8759;"&gt;"NOHE"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"" &lt;/SPAN&gt;+ graphic)&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}
&amp;nbsp; }
&amp;nbsp; })&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp; &lt;/SPAN&gt;}
}&lt;/PRE&gt;&lt;P&gt;Here is the screenshot of my end result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="214112" alt="2016-08-01_10-46-35.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/214113_2016-08-01_10-46-35.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:15:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/mapviewhelper-addpolygongraphic/m-p/84650#M641</guid>
      <dc:creator>AlexanderNohe1</dc:creator>
      <dc:date>2021-12-10T23:15:05Z</dc:date>
    </item>
  </channel>
</rss>

