<?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 set feature layer with graphics in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/set-feature-layer-with-graphics/m-p/630137#M4341</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;I'm trying to fill a feature layer with graphics but have the problem that when using the FeatureLayer(graphics[]) Instruction does not add the graphics to the feature layer showing the following Error "method invocation may produce java.lang.nullpointerexception,&amp;nbsp; I tried assigning a single value to the list level code does not generate any error and graphics list is filled correctly, or have any idea how that can fill a feature layer with a list of graphics?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;MapView&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;ArcGISFeatureLayer &lt;SPAN style="background-color: #e4e4ff;"&gt;featurelayerpoints&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FeatureSet &lt;SPAN style="background-color: #ffe4ff;"&gt;variablefeatureset&lt;/SPAN&gt; = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;null&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;Graphic&lt;/SPAN&gt; [] graficos = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;Graphic&lt;/SPAN&gt;[&lt;SPAN style="color: #660e7a;"&gt;listcount&lt;/SPAN&gt;];&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;for&lt;/SPAN&gt;(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;int &lt;/SPAN&gt;i = &lt;SPAN style="color: #0000ff;"&gt;0&lt;/SPAN&gt;;i&amp;lt; &lt;SPAN style="color: #660e7a;"&gt;listcount&lt;/SPAN&gt;;i++){&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;Point&lt;/SPAN&gt; wgspoint = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;Point&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;routesinfolist&lt;/SPAN&gt;&lt;I&gt;.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;Longitude&lt;/SPAN&gt;,&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;routesinfolist&lt;/SPAN&gt;&lt;I&gt;.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;Latitude&lt;/SPAN&gt;);&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;Point&lt;/SPAN&gt; mapPoint = (&lt;SPAN style="background-color: #e4e4ff;"&gt;Point&lt;/SPAN&gt;) GeometryEngine.&lt;SPAN style="font-style: italic;"&gt;project&lt;/SPAN&gt;(wgspoint, SpatialReference.&lt;SPAN style="font-style: italic;"&gt;create&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;4326&lt;/SPAN&gt;), &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.getSpatialReference());&lt;/P&gt;&lt;P&gt;Unit mapUnit = &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.getSpatialReference().getUnit();&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;double &lt;/SPAN&gt;zoomWidth = Unit.&lt;SPAN style="font-style: italic;"&gt;convertUnits&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;SEARCH_RADIUS&lt;/SPAN&gt;, Unit.&lt;SPAN style="font-style: italic;"&gt;create&lt;/SPAN&gt;(LinearUnit.Code.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;MILE_US&lt;/SPAN&gt;), mapUnit);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;attributes&lt;/SPAN&gt;.put(String.&lt;SPAN style="font-style: italic;"&gt;valueOf&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;routesinfolist&lt;/SPAN&gt;&lt;I&gt;.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;IDOrder&lt;/SPAN&gt;), &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"IDOrder"&lt;/SPAN&gt;);&lt;/I&gt;&lt;/P&gt;&lt;P&gt;graficos&lt;I&gt; = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Graphic(mapPoint, &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;PictureMarkerSymbol(getResources().getDrawable(R.drawable.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;circler&lt;/SPAN&gt;)), attributes, i);&lt;/I&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;variablefeatureset.setGraphics(graficos);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;featurelayerpoints &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArcGISFeatureLayer(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;null&lt;/SPAN&gt;, variablefeatureset, &lt;SPAN style="color: #000080; font-weight: bold;"&gt;null&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;mMapView&lt;/SPAN&gt;.addLayer(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;featurelayerpoints&lt;/SPAN&gt;,&lt;SPAN style="color: #0000ff;"&gt;5&lt;/SPAN&gt;);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Apr 2016 22:24:30 GMT</pubDate>
    <dc:creator>JoseVelasquez2</dc:creator>
    <dc:date>2016-04-06T22:24:30Z</dc:date>
    <item>
      <title>set feature layer with graphics</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/set-feature-layer-with-graphics/m-p/630137#M4341</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;I'm trying to fill a feature layer with graphics but have the problem that when using the FeatureLayer(graphics[]) Instruction does not add the graphics to the feature layer showing the following Error "method invocation may produce java.lang.nullpointerexception,&amp;nbsp; I tried assigning a single value to the list level code does not generate any error and graphics list is filled correctly, or have any idea how that can fill a feature layer with a list of graphics?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;MapView&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;ArcGISFeatureLayer &lt;SPAN style="background-color: #e4e4ff;"&gt;featurelayerpoints&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FeatureSet &lt;SPAN style="background-color: #ffe4ff;"&gt;variablefeatureset&lt;/SPAN&gt; = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;null&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;Graphic&lt;/SPAN&gt; [] graficos = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;Graphic&lt;/SPAN&gt;[&lt;SPAN style="color: #660e7a;"&gt;listcount&lt;/SPAN&gt;];&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;for&lt;/SPAN&gt;(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;int &lt;/SPAN&gt;i = &lt;SPAN style="color: #0000ff;"&gt;0&lt;/SPAN&gt;;i&amp;lt; &lt;SPAN style="color: #660e7a;"&gt;listcount&lt;/SPAN&gt;;i++){&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;Point&lt;/SPAN&gt; wgspoint = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;Point&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;routesinfolist&lt;/SPAN&gt;&lt;I&gt;.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;Longitude&lt;/SPAN&gt;,&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;routesinfolist&lt;/SPAN&gt;&lt;I&gt;.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;Latitude&lt;/SPAN&gt;);&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;Point&lt;/SPAN&gt; mapPoint = (&lt;SPAN style="background-color: #e4e4ff;"&gt;Point&lt;/SPAN&gt;) GeometryEngine.&lt;SPAN style="font-style: italic;"&gt;project&lt;/SPAN&gt;(wgspoint, SpatialReference.&lt;SPAN style="font-style: italic;"&gt;create&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;4326&lt;/SPAN&gt;), &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.getSpatialReference());&lt;/P&gt;&lt;P&gt;Unit mapUnit = &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.getSpatialReference().getUnit();&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;double &lt;/SPAN&gt;zoomWidth = Unit.&lt;SPAN style="font-style: italic;"&gt;convertUnits&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;SEARCH_RADIUS&lt;/SPAN&gt;, Unit.&lt;SPAN style="font-style: italic;"&gt;create&lt;/SPAN&gt;(LinearUnit.Code.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;MILE_US&lt;/SPAN&gt;), mapUnit);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;attributes&lt;/SPAN&gt;.put(String.&lt;SPAN style="font-style: italic;"&gt;valueOf&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;routesinfolist&lt;/SPAN&gt;&lt;I&gt;.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;IDOrder&lt;/SPAN&gt;), &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"IDOrder"&lt;/SPAN&gt;);&lt;/I&gt;&lt;/P&gt;&lt;P&gt;graficos&lt;I&gt; = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Graphic(mapPoint, &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;PictureMarkerSymbol(getResources().getDrawable(R.drawable.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;circler&lt;/SPAN&gt;)), attributes, i);&lt;/I&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;variablefeatureset.setGraphics(graficos);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;featurelayerpoints &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArcGISFeatureLayer(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;null&lt;/SPAN&gt;, variablefeatureset, &lt;SPAN style="color: #000080; font-weight: bold;"&gt;null&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;mMapView&lt;/SPAN&gt;.addLayer(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;featurelayerpoints&lt;/SPAN&gt;,&lt;SPAN style="color: #0000ff;"&gt;5&lt;/SPAN&gt;);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 22:24:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/set-feature-layer-with-graphics/m-p/630137#M4341</guid>
      <dc:creator>JoseVelasquez2</dc:creator>
      <dc:date>2016-04-06T22:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: set feature layer with graphics</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/set-feature-layer-with-graphics/m-p/630138#M4342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jose,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; What are you developing for ArcGIS Runtime or is this .Net SDK or what? You have this question in the general GeoNet community help and there are many more appropriate places for this question if I knew what you are programming against.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 01:19:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/set-feature-layer-with-graphics/m-p/630138#M4342</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-04-07T01:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: set feature layer with graphics</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/set-feature-layer-with-graphics/m-p/630139#M4343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'm developing in android&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2016 14:54:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/set-feature-layer-with-graphics/m-p/630139#M4343</guid>
      <dc:creator>JoseVelasquez2</dc:creator>
      <dc:date>2016-04-08T14:54:34Z</dc:date>
    </item>
  </channel>
</rss>

