<?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 Shapefile not visible after add to the map in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/shapefile-not-visible-after-add-to-the-map/m-p/727889#M5076</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;I tried to add some local shapefile data to the map, and I use the ShapefileFeatureTable, however it does not work, core codes:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMap &lt;/SPAN&gt;= (MapView) root.findViewById(R.id.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;mapView&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;try &lt;/SPAN&gt;{
&amp;nbsp; ShapefileFeatureTable sft = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ShapefileFeatureTable(path);
&amp;nbsp; Renderer renderer = RendererHelper.&lt;SPAN style="font-style: italic;"&gt;getRender&lt;/SPAN&gt;(sft.getTableName(), sft.getGeometryType());
&amp;nbsp; FeatureLayer featureLayer = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;FeatureLayer(sft);
&amp;nbsp; featureLayer.setRenderer(renderer);
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMap&lt;/SPAN&gt;.addLayer(featureLayer);
} &lt;SPAN style="color: #000080; font-weight: bold;"&gt;catch &lt;/SPAN&gt;(Exception e) {
&amp;nbsp; Toast.&lt;SPAN style="font-style: italic;"&gt;makeText&lt;/SPAN&gt;(getActivity(), &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Error:" &lt;/SPAN&gt;+ e.getMessage(), Toast.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;LENGTH_LONG&lt;/SPAN&gt;).show();
}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public class &lt;/SPAN&gt;RendererHelper {
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;public static &lt;/SPAN&gt;Renderer getRender(String tableName, Geometry.Type type) {
&amp;nbsp; List&amp;lt;Symbol&amp;gt; list = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArrayList&amp;lt;&amp;gt;();
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;switch &lt;/SPAN&gt;(type) {
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;case &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;POINT&lt;/SPAN&gt;:
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;case &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;MULTIPOINT&lt;/SPAN&gt;:
&amp;nbsp; SimpleMarkerSymbol sms = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleMarkerSymbol(Color.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;RED&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;20&lt;/SPAN&gt;, SimpleMarkerSymbol.STYLE.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;CIRCLE&lt;/SPAN&gt;);
&amp;nbsp; list.add(sms);
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;break&lt;/SPAN&gt;;
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;case &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;LINE&lt;/SPAN&gt;:
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;case &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;POLYLINE&lt;/SPAN&gt;:
&amp;nbsp; SimpleLineSymbol sls = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleLineSymbol(Color.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;RED&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;5&lt;/SPAN&gt;, SimpleLineSymbol.STYLE.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;DOT&lt;/SPAN&gt;);
&amp;nbsp; list.add(sls);
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;break&lt;/SPAN&gt;;
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;case &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;POLYGON&lt;/SPAN&gt;:
&amp;nbsp; SimpleFillSymbol ps = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleFillSymbol(Color.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;RED&lt;/SPAN&gt;, SimpleFillSymbol.STYLE.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;SOLID&lt;/SPAN&gt;);
&amp;nbsp; SimpleLineSymbol pl = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleLineSymbol(Color.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;RED&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;1&lt;/SPAN&gt;, SimpleLineSymbol.STYLE.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;DOT&lt;/SPAN&gt;);
&amp;nbsp; list.add(ps);
&amp;nbsp; list.add(pl);
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;break&lt;/SPAN&gt;;
&amp;nbsp; }

&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;return new &lt;/SPAN&gt;SimpleRenderer(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleFillSymbol(Color.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;RED&lt;/SPAN&gt;, SimpleFillSymbol.STYLE.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;SOLID&lt;/SPAN&gt;));
&amp;nbsp; }
}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I meet&amp;nbsp; two problems:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 The shapfile is not visible in the map&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 As shown the simpleRenderer does not support the compositesymbol(it will show the json erro)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's going on?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 07:07:24 GMT</pubDate>
    <dc:creator>kkkk1</dc:creator>
    <dc:date>2021-12-12T07:07:24Z</dc:date>
    <item>
      <title>Shapefile not visible after add to the map</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/shapefile-not-visible-after-add-to-the-map/m-p/727889#M5076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;I tried to add some local shapefile data to the map, and I use the ShapefileFeatureTable, however it does not work, core codes:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMap &lt;/SPAN&gt;= (MapView) root.findViewById(R.id.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;mapView&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;try &lt;/SPAN&gt;{
&amp;nbsp; ShapefileFeatureTable sft = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ShapefileFeatureTable(path);
&amp;nbsp; Renderer renderer = RendererHelper.&lt;SPAN style="font-style: italic;"&gt;getRender&lt;/SPAN&gt;(sft.getTableName(), sft.getGeometryType());
&amp;nbsp; FeatureLayer featureLayer = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;FeatureLayer(sft);
&amp;nbsp; featureLayer.setRenderer(renderer);
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMap&lt;/SPAN&gt;.addLayer(featureLayer);
} &lt;SPAN style="color: #000080; font-weight: bold;"&gt;catch &lt;/SPAN&gt;(Exception e) {
&amp;nbsp; Toast.&lt;SPAN style="font-style: italic;"&gt;makeText&lt;/SPAN&gt;(getActivity(), &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Error:" &lt;/SPAN&gt;+ e.getMessage(), Toast.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;LENGTH_LONG&lt;/SPAN&gt;).show();
}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public class &lt;/SPAN&gt;RendererHelper {
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;public static &lt;/SPAN&gt;Renderer getRender(String tableName, Geometry.Type type) {
&amp;nbsp; List&amp;lt;Symbol&amp;gt; list = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArrayList&amp;lt;&amp;gt;();
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;switch &lt;/SPAN&gt;(type) {
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;case &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;POINT&lt;/SPAN&gt;:
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;case &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;MULTIPOINT&lt;/SPAN&gt;:
&amp;nbsp; SimpleMarkerSymbol sms = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleMarkerSymbol(Color.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;RED&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;20&lt;/SPAN&gt;, SimpleMarkerSymbol.STYLE.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;CIRCLE&lt;/SPAN&gt;);
&amp;nbsp; list.add(sms);
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;break&lt;/SPAN&gt;;
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;case &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;LINE&lt;/SPAN&gt;:
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;case &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;POLYLINE&lt;/SPAN&gt;:
&amp;nbsp; SimpleLineSymbol sls = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleLineSymbol(Color.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;RED&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;5&lt;/SPAN&gt;, SimpleLineSymbol.STYLE.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;DOT&lt;/SPAN&gt;);
&amp;nbsp; list.add(sls);
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;break&lt;/SPAN&gt;;
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;case &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;POLYGON&lt;/SPAN&gt;:
&amp;nbsp; SimpleFillSymbol ps = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleFillSymbol(Color.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;RED&lt;/SPAN&gt;, SimpleFillSymbol.STYLE.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;SOLID&lt;/SPAN&gt;);
&amp;nbsp; SimpleLineSymbol pl = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleLineSymbol(Color.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;RED&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;1&lt;/SPAN&gt;, SimpleLineSymbol.STYLE.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;DOT&lt;/SPAN&gt;);
&amp;nbsp; list.add(ps);
&amp;nbsp; list.add(pl);
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;break&lt;/SPAN&gt;;
&amp;nbsp; }

&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;return new &lt;/SPAN&gt;SimpleRenderer(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleFillSymbol(Color.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;RED&lt;/SPAN&gt;, SimpleFillSymbol.STYLE.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;SOLID&lt;/SPAN&gt;));
&amp;nbsp; }
}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I meet&amp;nbsp; two problems:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 The shapfile is not visible in the map&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 As shown the simpleRenderer does not support the compositesymbol(it will show the json erro)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's going on?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:07:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/shapefile-not-visible-after-add-to-the-map/m-p/727889#M5076</guid>
      <dc:creator>kkkk1</dc:creator>
      <dc:date>2021-12-12T07:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Shapefile not visible after add to the map</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/shapefile-not-visible-after-add-to-the-map/m-p/727890#M5077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey buddy... Did you manage to get it work loading the ShapeFile?&lt;A href="https://community.esri.com/migrated-users/130136"&gt;kk kk&lt;/A&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jul 2015 03:40:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/shapefile-not-visible-after-add-to-the-map/m-p/727890#M5077</guid>
      <dc:creator>CamiloMedina</dc:creator>
      <dc:date>2015-07-18T03:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Shapefile not visible after add to the map</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/shapefile-not-visible-after-add-to-the-map/m-p/727891#M5078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you confirm what spatial reference your mapview is in (its based on the first layer you add, typically the basemap layer) and the spatial reference of the shapefile? They will need to match for this to work, we do not re-project shapefiles due to performance issues.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 19:24:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/shapefile-not-visible-after-add-to-the-map/m-p/727891#M5078</guid>
      <dc:creator>WillCrick</dc:creator>
      <dc:date>2015-07-30T19:24:42Z</dc:date>
    </item>
  </channel>
</rss>

