<?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: Create AGSClassBreak with hatch in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341209#M7672</link>
    <description>&lt;P&gt;Thanks for the details. Runtime API does not expose the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/fill-symbol-layers.htm" target="_self"&gt;hatched symbol&lt;/A&gt; settings like in ArcGIS Pro, say setting the pattern with angle/separation/offset.&lt;/P&gt;&lt;P&gt;One potential way is to use the &lt;EM&gt;AGSPictureFillSymbol&lt;/EM&gt;, where you use an image for the repeating pattern. You can try to create an image swatch from code and use it for the symbol.&lt;/P&gt;&lt;P&gt;I'll try tomorrow to see if there is another way to do that. Stay tuned.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Oct 2023 01:49:05 GMT</pubDate>
    <dc:creator>Ting</dc:creator>
    <dc:date>2023-10-25T01:49:05Z</dc:date>
    <item>
      <title>Create AGSClassBreak with hatch</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341165#M7669</link>
      <description>&lt;P&gt;Is there a way to create a&amp;nbsp;AGSClassBreak using a hatch type fill? Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 21:21:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341165#M7669</guid>
      <dc:creator>RTC</dc:creator>
      <dc:date>2023-10-24T21:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create AGSClassBreak with hatch</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341169#M7670</link>
      <description>&lt;P&gt;Can you specify your question a bit more?&lt;/P&gt;&lt;P&gt;Generally speaking, you can use a &lt;EM&gt;AGSSimpleFillSymbol&lt;/EM&gt; for a class break renderer. The fill symbol has many styles, including&amp;nbsp;&lt;EM&gt;&lt;A href="https://developers.arcgis.com/swift/api-reference/documentation/arcgis/simplefillsymbol/style-swift.enum/backwarddiagonal" target="_blank" rel="noopener"&gt;&lt;SPAN class=""&gt;backwardDiagonal&lt;/SPAN&gt;&lt;/A&gt;&lt;/EM&gt;&amp;nbsp;which is a kind of hatch fill. Then you can add a &lt;EM&gt;AGSClassBreak&lt;/EM&gt; using this symbol like shown in this documentation: &lt;A href="https://developers.arcgis.com/documentation/mapping-apis-and-services/visualization/data-driven-styles/class-breaks/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/documentation/mapping-apis-and-services/visualization/data-driven-styles/class-breaks/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;See another example at &lt;A href="https://developers.arcgis.com/ios/styles-and-data-visualization/tutorials/style-a-feature-layer/" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 21:31:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341169#M7670</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2023-10-24T21:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create AGSClassBreak with hatch</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341173#M7671</link>
      <description>&lt;P&gt;Hi Ting, thanks for the quick reply. Yes, I am defining class break renderers and using simpleFillSymbol to define the fills. I tried to use the different styles, including the backwardDiagonal but didn't see anyway to modify the lines of the hatch. Is there way to do that?&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 21:39:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341173#M7671</guid>
      <dc:creator>RTC</dc:creator>
      <dc:date>2023-10-24T21:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create AGSClassBreak with hatch</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341209#M7672</link>
      <description>&lt;P&gt;Thanks for the details. Runtime API does not expose the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/fill-symbol-layers.htm" target="_self"&gt;hatched symbol&lt;/A&gt; settings like in ArcGIS Pro, say setting the pattern with angle/separation/offset.&lt;/P&gt;&lt;P&gt;One potential way is to use the &lt;EM&gt;AGSPictureFillSymbol&lt;/EM&gt;, where you use an image for the repeating pattern. You can try to create an image swatch from code and use it for the symbol.&lt;/P&gt;&lt;P&gt;I'll try tomorrow to see if there is another way to do that. Stay tuned.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 01:49:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341209#M7672</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2023-10-25T01:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create AGSClassBreak with hatch</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341564#M7673</link>
      <description>&lt;P&gt;Actually, there is a more elaborated way to create the hatched fill symbol, using the &lt;A href="https://developers.arcgis.com/ios/api-reference/interface_a_g_s_hatch_fill_symbol_layer.html" target="_self"&gt;&lt;EM&gt;AGSHatchFillSymbolLayer&lt;/EM&gt;&lt;/A&gt;&amp;nbsp;API. Basically, you create a hatch fill symbol layer with hatched lines at the given angle and separation, and then create a&amp;nbsp;multilayer polygon symbol from the hatched line layer. Then this symbol can be used for your polygons. The gist looks like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="swift"&gt;        // Create a stroke symbol layer to make the symbol layer.
        let strokeLayer = SolidStrokeSymbolLayer(width: 2, color: .red)
        // Create a hatch fill symbol layer with hatched lines at the given angle.
        let hatchLayer = HatchFillSymbolLayer(
            polylineSymbol: MultilayerPolylineSymbol(symbolLayers: [strokeLayer]),
            angle: angle
        )
        // Set separation distance for lines.
        hatchLayer.separation = 9
        // Create a multilayer polygon symbol from the symbol layer list.
        let polygonSymbol = MultilayerPolygonSymbol(symbolLayers: [hatchLayer])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;You can check out an example in the new Swift API samples &lt;A href="https://github.com/Esri/arcgis-maps-sdk-swift-samples/blob/daec605baa1e229e44c8d2d890302170faff83af/Shared/Samples/Render%20multilayer%20symbols/RenderMultilayerSymbolsView.swift#L265" target="_self"&gt;here&lt;/A&gt;. Hope it helps!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ting_0-1698255901636.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/83995i1B75AAA8652656CE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ting_0-1698255901636.png" alt="Ting_0-1698255901636.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 17:45:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341564#M7673</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2023-10-25T17:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create AGSClassBreak with hatch</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341574#M7674</link>
      <description>&lt;P&gt;Thanks Ting!&amp;nbsp; Will give this a try and make your answer as the solution once I can verify it's working. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 18:14:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341574#M7674</guid>
      <dc:creator>RTC</dc:creator>
      <dc:date>2023-10-25T18:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create AGSClassBreak with hatch</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341681#M7675</link>
      <description>&lt;P&gt;Hi Ting, this is about 90% there, is there a way to add an outline (border)?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 20:59:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341681#M7675</guid>
      <dc:creator>RTC</dc:creator>
      <dc:date>2023-10-25T20:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create AGSClassBreak with hatch</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341740#M7676</link>
      <description>&lt;P&gt;Yup - you can append another stroke layer to the symbolLayers array, such as&lt;/P&gt;&lt;P&gt;let polygonSymbol = MultilayerPolygonSymbol(symbolLayers: [hatchLayer, strokeLayer])&lt;/P&gt;&lt;P&gt;The stroke symbol will serve as the outline symbol.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 23:09:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341740#M7676</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2023-10-25T23:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create AGSClassBreak with hatch</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341747#M7677</link>
      <description>&lt;P&gt;I did not see a way to use the strokeLayer to act as an outline (border). Can you provide an example of how that would be done?&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 23:20:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341747#M7677</guid>
      <dc:creator>RTC</dc:creator>
      <dc:date>2023-10-25T23:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: Create AGSClassBreak with hatch</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341751#M7678</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ting_0-1698276234446.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/84046iAAED2C94D48023A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ting_0-1698276234446.png" alt="Ting_0-1698276234446.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;With the change above, this is what you see.&lt;/P&gt;&lt;P&gt;If you want to use another type of stroke as the border, you can create another symbol, such as&lt;/P&gt;&lt;LI-CODE lang="swift"&gt;// Create a stroke symbol layer to make the symbol layer.
let strokeLayer = SolidStrokeSymbolLayer(width: 2, color: .red)
// Create a hatch fill symbol layer with hatched lines at the given angle.
let hatchLayer = HatchFillSymbolLayer(
    polylineSymbol: MultilayerPolylineSymbol(symbolLayers: [strokeLayer]),
    angle: angle
)
// Set separation distance for lines.
hatchLayer.separation = 25
// Create a stroke for the outline.
let outlineStrokeLayer = SolidStrokeSymbolLayer(width: 5, color: .blue)
// Create a multilayer polygon symbol from the symbol layer list.
let polygonSymbol = MultilayerPolygonSymbol(symbolLayers: [hatchLayer, outlineStrokeLayer])&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ting_1-1698276350057.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/84047i0FBBC34DDFAF1839/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ting_1-1698276350057.png" alt="Ting_1-1698276350057.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 23:26:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341751#M7678</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2023-10-25T23:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create AGSClassBreak with hatch</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341753#M7679</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 23:30:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/create-agsclassbreak-with-hatch/m-p/1341753#M7679</guid>
      <dc:creator>RTC</dc:creator>
      <dc:date>2023-10-25T23:30:42Z</dc:date>
    </item>
  </channel>
</rss>

