<?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: free-form drawing in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/free-form-drawing/m-p/73833#M726</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. AGSSketchEditor has a "style" property which has a "&lt;SPAN class=""&gt;feedbackLineSymbol" property. You can set that to whatever line symbol you want. It defaults to a dashed symbol.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;2. You can save the resulting geometry, which will be a Polygon or Polyline as JSON. They support AGSJSONSerializable. From there you can store it in user defaults or however you want. And then re-hydrate the geometry from JSON later.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Mar 2017 19:10:59 GMT</pubDate>
    <dc:creator>RyanOlson1</dc:creator>
    <dc:date>2017-03-09T19:10:59Z</dc:date>
    <item>
      <title>free-form drawing</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/free-form-drawing/m-p/73830#M723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does ESRI have the ability to allow free-form drawing (a.k.a. 'doodling') within a layer?&lt;/P&gt;&lt;P style="font-size: 11px;"&gt;&lt;SPAN style="font-size: 15px;"&gt;That is, where the user's finger movement is recorded into a path as can be done within iOS's Core Graphics:&amp;nbsp;&lt;SPAN style="color: #bb2ca2;"&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; simplePath = &lt;/SPAN&gt;&lt;SPAN style="color: #703daa;"&gt;UIBezierPath&lt;/SPAN&gt;&lt;SPAN&gt;() ... etc.?&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P style="font-size: 11px;"&gt;&lt;/P&gt;&lt;P style="font-size: 11px;"&gt;&lt;SPAN style="font-size: 15px;"&gt;Scenario: &amp;nbsp;I wish to doodle annotations (drawing) on an overlay and be able to store &amp;amp; recover such doodle.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px;"&gt;&lt;SPAN style="font-size: 15px;"&gt;How would/could that be arranged?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2017 22:34:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/free-form-drawing/m-p/73830#M723</guid>
      <dc:creator>FrederickLee1</dc:creator>
      <dc:date>2017-03-08T22:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: free-form drawing</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/free-form-drawing/m-p/73831#M724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes - you can use the AGSSketchEditor with the creation mode of&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;AGSSketchCreationModeFreehandPolyline or&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;AGSSketchCreationModeFreehandPolygon.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Here is a sample that is using vertex editing. But change the creation mode to one of the above (ie .freehandPolyline) and you can sketch lines on the map.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-runtime-samples-ios/blob/master/arcgis-ios-sdk-samples/Display%20information/Sketch%20on%20the%20map/SketchViewController.swift" title="https://github.com/Esri/arcgis-runtime-samples-ios/blob/master/arcgis-ios-sdk-samples/Display%20information/Sketch%20on%20the%20map/SketchViewController.swift"&gt;arcgis-runtime-samples-ios/SketchViewController.swift at master · Esri/arcgis-runtime-samples-ios · GitHub&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 02:48:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/free-form-drawing/m-p/73831#M724</guid>
      <dc:creator>RyanOlson1</dc:creator>
      <dc:date>2017-03-09T02:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: free-form drawing</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/free-form-drawing/m-p/73832#M725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick response!&lt;/P&gt;&lt;P&gt;I'm going to play with this per your directive.&lt;/P&gt;&lt;P&gt;Ric.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 17:52:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/free-form-drawing/m-p/73832#M725</guid>
      <dc:creator>FrederickLee1</dc:creator>
      <dc:date>2017-03-09T17:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: free-form drawing</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/free-form-drawing/m-p/73833#M726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. AGSSketchEditor has a "style" property which has a "&lt;SPAN class=""&gt;feedbackLineSymbol" property. You can set that to whatever line symbol you want. It defaults to a dashed symbol.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;2. You can save the resulting geometry, which will be a Polygon or Polyline as JSON. They support AGSJSONSerializable. From there you can store it in user defaults or however you want. And then re-hydrate the geometry from JSON later.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 19:10:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/free-form-drawing/m-p/73833#M726</guid>
      <dc:creator>RyanOlson1</dc:creator>
      <dc:date>2017-03-09T19:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: free-form drawing</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/free-form-drawing/m-p/73834#M727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Reference:&lt;/STRONG&gt; ESRI's Sketch Example:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Environment:&lt;/STRONG&gt; iOS/Swift 3.0+&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I notice that no overlays are used in the sketch, which uses the&amp;nbsp;&lt;SPAN&gt;AGSSketchEditor.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However I believe I need the use of a graphics overlay object to display historical sketches.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hence I've added the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px;"&gt;&lt;SPAN style="color: #bb2ca2;"&gt;&amp;nbsp;private&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; myPolyLine:&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;AGSPolyline&lt;/SPAN&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;private&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; graphicsOverlay = &lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;AGSGraphicsOverlay&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Making a copy of the sketch as a 'geometry':&lt;/P&gt;&lt;P style="color: #bb2ca2; font-size: 11px;"&gt;&lt;/P&gt;&lt;P style="color: #bb2ca2; font-size: 11px;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;@IBAction&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN&gt;func&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; clear() {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #4f8187; font-size: 11px;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;myPolyLine&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;sketchEditor&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;geometry&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;!.&lt;/SPAN&gt;&lt;SPAN style="color: #3d1d81;"&gt;copy&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;() &lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;? &lt;/SPAN&gt;&lt;SPAN&gt;AGSPolyline&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #31595d; font-size: 11px;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;sketchEditor&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;clearGeometry&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;()&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px;"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Restoring the sketch after 'deleting' it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #008400; font-size: 11px;"&gt;&lt;SPAN style="color: #bb2ca2;"&gt;case&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #272ad8;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;// ...redraw&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px;"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; lineSymbol = &lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;AGSSimpleLineSymbol&lt;/SPAN&gt;&lt;SPAN&gt;(style: .&lt;/SPAN&gt;&lt;SPAN style="color: #31595d;"&gt;solid&lt;/SPAN&gt;&lt;SPAN&gt;, color: &lt;/SPAN&gt;&lt;SPAN style="color: #703daa;"&gt;UIColor&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #703daa;"&gt;red&lt;/SPAN&gt;&lt;SPAN&gt;, width: &lt;/SPAN&gt;&lt;SPAN style="color: #272ad8;"&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px;"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;graphicsOverlay&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;graphics&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #3d1d81;"&gt;add&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;AGSGraphic&lt;/SPAN&gt;&lt;SPAN&gt;(geometry: &lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;myPolyLine&lt;/SPAN&gt;&lt;SPAN&gt;, symbol: lineSymbol, attributes: &lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;nil&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #4f8187; font-size: 11px;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;mapView&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;graphicsOverlays&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #3d1d81;"&gt;add&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;graphicsOverlay&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I needed to create a graphics overlay to display the copy.&lt;/P&gt;&lt;P&gt;I can see the buildup of graphicOverlays.&lt;/P&gt;&lt;P&gt;So once I don't need this copy, I should REMOVE this particular overlay.&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is, each overlay would contain a previously-copied sketch and hence,&lt;/P&gt;&lt;P&gt;I should discard these overlays once not needed. &amp;nbsp; Correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for persistent storage: a AGSPolyline is an NSObject so I could serialize it for storage accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this the correct way for creating a persistent store of a sketch and handling old sketches via removing the overlays?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 23:35:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/free-form-drawing/m-p/73834#M727</guid>
      <dc:creator>FrederickLee1</dc:creator>
      <dc:date>2017-03-09T23:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: free-form drawing</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/free-form-drawing/m-p/73835#M728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't need to copy the geometry, it's immutable.&lt;/P&gt;&lt;P&gt;GraphicsOverlays can be re-used, and you can remove/add graphics from them.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 17:43:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/free-form-drawing/m-p/73835#M728</guid>
      <dc:creator>RyanOlson1</dc:creator>
      <dc:date>2017-03-10T17:43:16Z</dc:date>
    </item>
  </channel>
</rss>

