<?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: Accessing the Stylx file in Java in Java Maps SDK Questions</title>
    <link>https://community.esri.com/t5/java-maps-sdk-questions/accessing-the-stylx-file-in-java/m-p/92575#M275</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shiva,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you may use the DictionarySymbolStyle class (&lt;A class="link-titled" href="https://developers.arcgis.com/java/latest/api-reference/reference/com/esri/arcgisruntime/symbology/DictionarySymbolStyle.html" title="https://developers.arcgis.com/java/latest/api-reference/reference/com/esri/arcgisruntime/symbology/DictionarySymbolStyle.html"&gt;DictionarySymbolStyle| arcgis-java&lt;/A&gt;) to achieve the same results. In using that class ensure you have the right specification type in the constructor.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I put the below code snippet together for illustration.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private void loadSymbolStyle(String PATH_TO_SYMBOL, String PATH_TO_A_SHAPEFILE) {&lt;BR /&gt; List&amp;lt;String&amp;gt; keys = new ArrayList&amp;lt;&amp;gt;();&lt;BR /&gt; keys.add("key1");&lt;BR /&gt; keys.add("key2");&lt;BR /&gt; ShapefileFeatureTable shapefile = new ShapefileFeatureTable(&lt;SPAN&gt;PATH_TO_A_SHAPEFILE&lt;/SPAN&gt;);&lt;BR /&gt; FeatureLayer featureLayer = new FeatureLayer(shapefile);&lt;BR /&gt; featureLayer.loadAsync();&lt;/P&gt;&lt;P&gt;DictionarySymbolStyle dictionarySymStyle = new DictionarySymbolStyle("mil2525d", PATH_TO_SYMBOL);&lt;BR /&gt; dictionarySymStyle.loadAsync();&lt;BR /&gt; dictionarySymStyle.addDoneLoadingListener(() -&amp;gt; {&lt;BR /&gt; if (dictionarySymStyle.getLoadStatus() == LoadStatus.LOADED) {&lt;BR /&gt; System.out.println("Loaded!!!");&lt;BR /&gt; symbolFuture = dictionarySymStyle.getSymbolAsync(keys);&lt;BR /&gt; try {&lt;BR /&gt; Symbol symbol = symbolFuture.get();&lt;BR /&gt; featureLayer.setRenderer(new SimpleRenderer(symbol));&lt;BR /&gt; mapView.getMap().getOperationalLayers().add(featureLayer);&amp;nbsp; //add loaded layer to map&lt;BR /&gt; mapView.setViewpointGeometryAsync(featureLayer.getFullExtent(), 100); //zoom to extent&lt;/P&gt;&lt;P&gt;} catch (InterruptedException | ExecutionException inEx) {&lt;BR /&gt; System.out.println("Get Exception: " + inEx.getMessage());&lt;BR /&gt; }&lt;BR /&gt; } else {&lt;BR /&gt; System.out.println("Load Error: " + dictionarySymStyle.getLoadError().getAdditionalMessage()); //use this for debugging your code&lt;BR /&gt; }&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Feb 2018 13:13:44 GMT</pubDate>
    <dc:creator>KwasiAsante1</dc:creator>
    <dc:date>2018-02-27T13:13:44Z</dc:date>
    <item>
      <title>Accessing the Stylx file in Java</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/accessing-the-stylx-file-in-java/m-p/92574#M274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Unable access customize Stylx file by using SymbolStyle API in Java.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;SymbolStyle symbolstyle = await SymbolStyle.OpenAsync(String Path); (.Net).&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;But in&amp;nbsp;&amp;nbsp;java not find the Open Method of SymbolStyle API.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2018 12:22:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/accessing-the-stylx-file-in-java/m-p/92574#M274</guid>
      <dc:creator>Siva_SankaraReddy_T</dc:creator>
      <dc:date>2018-02-27T12:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the Stylx file in Java</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/accessing-the-stylx-file-in-java/m-p/92575#M275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shiva,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you may use the DictionarySymbolStyle class (&lt;A class="link-titled" href="https://developers.arcgis.com/java/latest/api-reference/reference/com/esri/arcgisruntime/symbology/DictionarySymbolStyle.html" title="https://developers.arcgis.com/java/latest/api-reference/reference/com/esri/arcgisruntime/symbology/DictionarySymbolStyle.html"&gt;DictionarySymbolStyle| arcgis-java&lt;/A&gt;) to achieve the same results. In using that class ensure you have the right specification type in the constructor.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I put the below code snippet together for illustration.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private void loadSymbolStyle(String PATH_TO_SYMBOL, String PATH_TO_A_SHAPEFILE) {&lt;BR /&gt; List&amp;lt;String&amp;gt; keys = new ArrayList&amp;lt;&amp;gt;();&lt;BR /&gt; keys.add("key1");&lt;BR /&gt; keys.add("key2");&lt;BR /&gt; ShapefileFeatureTable shapefile = new ShapefileFeatureTable(&lt;SPAN&gt;PATH_TO_A_SHAPEFILE&lt;/SPAN&gt;);&lt;BR /&gt; FeatureLayer featureLayer = new FeatureLayer(shapefile);&lt;BR /&gt; featureLayer.loadAsync();&lt;/P&gt;&lt;P&gt;DictionarySymbolStyle dictionarySymStyle = new DictionarySymbolStyle("mil2525d", PATH_TO_SYMBOL);&lt;BR /&gt; dictionarySymStyle.loadAsync();&lt;BR /&gt; dictionarySymStyle.addDoneLoadingListener(() -&amp;gt; {&lt;BR /&gt; if (dictionarySymStyle.getLoadStatus() == LoadStatus.LOADED) {&lt;BR /&gt; System.out.println("Loaded!!!");&lt;BR /&gt; symbolFuture = dictionarySymStyle.getSymbolAsync(keys);&lt;BR /&gt; try {&lt;BR /&gt; Symbol symbol = symbolFuture.get();&lt;BR /&gt; featureLayer.setRenderer(new SimpleRenderer(symbol));&lt;BR /&gt; mapView.getMap().getOperationalLayers().add(featureLayer);&amp;nbsp; //add loaded layer to map&lt;BR /&gt; mapView.setViewpointGeometryAsync(featureLayer.getFullExtent(), 100); //zoom to extent&lt;/P&gt;&lt;P&gt;} catch (InterruptedException | ExecutionException inEx) {&lt;BR /&gt; System.out.println("Get Exception: " + inEx.getMessage());&lt;BR /&gt; }&lt;BR /&gt; } else {&lt;BR /&gt; System.out.println("Load Error: " + dictionarySymStyle.getLoadError().getAdditionalMessage()); //use this for debugging your code&lt;BR /&gt; }&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2018 13:13:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/accessing-the-stylx-file-in-java/m-p/92575#M275</guid>
      <dc:creator>KwasiAsante1</dc:creator>
      <dc:date>2018-02-27T13:13:44Z</dc:date>
    </item>
  </channel>
</rss>

