<?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 Custom Vector graphics for current location in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1228927#M7480</link>
    <description>&lt;P&gt;I am trying to replace the blue dot for the current location with a custom vector graphic.&amp;nbsp; I know you can replace the image with a .png or some other fixed image.&lt;/P&gt;&lt;P&gt;It would appear that AGSVectorMarkerSymbolElement might fit the situation, but I am having a problem constructing the object based on this statement&lt;/P&gt;&lt;P&gt;To create a red square, for example, construct an instance &lt;A title="A class representing a component of a vector marker. A single instance of AGSVectorMarkerSymbolElemen..." href="https://developers.arcgis.com/ios/api-reference/interface_a_g_s_vector_marker_symbol_element.html" target="_blank" rel="noopener"&gt;AGSVectorMarkerSymbolElement&lt;/A&gt; with a &lt;A title="A multilayer polygon symbol." href="https://developers.arcgis.com/ios/api-reference/interface_a_g_s_multilayer_polygon_symbol.html" target="_blank" rel="noopener"&gt;AGSMultilayerPolygonSymbol&lt;/A&gt; that contains a red &lt;A title="A class representing a solid fill symbol layer." href="https://developers.arcgis.com/ios/api-reference/interface_a_g_s_solid_fill_symbol_layer.html" target="_blank" rel="noopener"&gt;AGSSolidFillSymbolLayer&lt;/A&gt; and a square geometry.&lt;/P&gt;&lt;P&gt;This appears to use layers instead of overlays, and I am not sure if layers can be animated (or converted to an overlay somehow).&amp;nbsp; It also appears that the functionality I am looking for (animated vector graphics on the map), is more of a ArcGIS pro thing where the element is created as a JSON object, but I can't be sure based on the documentation.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Nov 2022 21:29:59 GMT</pubDate>
    <dc:creator>decay</dc:creator>
    <dc:date>2022-11-04T21:29:59Z</dc:date>
    <item>
      <title>Custom Vector graphics for current location</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1228927#M7480</link>
      <description>&lt;P&gt;I am trying to replace the blue dot for the current location with a custom vector graphic.&amp;nbsp; I know you can replace the image with a .png or some other fixed image.&lt;/P&gt;&lt;P&gt;It would appear that AGSVectorMarkerSymbolElement might fit the situation, but I am having a problem constructing the object based on this statement&lt;/P&gt;&lt;P&gt;To create a red square, for example, construct an instance &lt;A title="A class representing a component of a vector marker. A single instance of AGSVectorMarkerSymbolElemen..." href="https://developers.arcgis.com/ios/api-reference/interface_a_g_s_vector_marker_symbol_element.html" target="_blank" rel="noopener"&gt;AGSVectorMarkerSymbolElement&lt;/A&gt; with a &lt;A title="A multilayer polygon symbol." href="https://developers.arcgis.com/ios/api-reference/interface_a_g_s_multilayer_polygon_symbol.html" target="_blank" rel="noopener"&gt;AGSMultilayerPolygonSymbol&lt;/A&gt; that contains a red &lt;A title="A class representing a solid fill symbol layer." href="https://developers.arcgis.com/ios/api-reference/interface_a_g_s_solid_fill_symbol_layer.html" target="_blank" rel="noopener"&gt;AGSSolidFillSymbolLayer&lt;/A&gt; and a square geometry.&lt;/P&gt;&lt;P&gt;This appears to use layers instead of overlays, and I am not sure if layers can be animated (or converted to an overlay somehow).&amp;nbsp; It also appears that the functionality I am looking for (animated vector graphics on the map), is more of a ArcGIS pro thing where the element is created as a JSON object, but I can't be sure based on the documentation.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 21:29:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1228927#M7480</guid>
      <dc:creator>decay</dc:creator>
      <dc:date>2022-11-04T21:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Vector graphics for current location</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1229228#M7481</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello and thank you for your question. &amp;nbsp;Creating a multi-layer symbol requires several steps. &amp;nbsp;Below is code to create a square polygon symbol using custom points and using that as the default location display symbol.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="swift"&gt;// The array of points for our shape (polygon), a 1 x 1 square
// The size is set on the final symbol, below.
let points = [
    AGSPoint(x: 0, y: 0, spatialReference: nil),
    AGSPoint(x: 0, y: 1, spatialReference: nil),
    AGSPoint(x: 1, y: 1, spatialReference: nil),
    AGSPoint(x: 1, y: 0, spatialReference: nil)
]
// Create the polygon from our points.
let polygon = AGSPolygon(points: points)
// Create a red solid fill symbol layer.
let redFill = AGSSolidFillSymbolLayer(color: .red)
// Create a multi-layer polygons ymbol from the solid fill layer.
let multiLayerPolygonSymbol = AGSMultilayerPolygonSymbol(symbolLayers: [redFill])
// Create a vector marker element using our polygon geometry and multi-layer symbol.
let vectorElement = AGSVectorMarkerSymbolElement(geometry: polygon, multilayerSymbol: multiLayerPolygonSymbol)
// Create a vector marker symbol layer from our element.
let vectorMarker = AGSVectorMarkerSymbolLayer(vectorMarkerSymbolElements: [vectorElement])
// Create the multi-layer point symbol.
let symbol = AGSMultilayerPointSymbol(symbolLayers: [vectorMarker])
// Set the size of our symbol.
symbol.size = 24.0
// Set our symbol as the location display symbol.
mapView.locationDisplay.defaultSymbol = symbol&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;You can modify the "points" array to get any geometry you'd like.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regarding animation, there is no built-in animation capabilities with the Runtime as relates to the location display or graphics. &amp;nbsp;However it is possible to programmatically modify the symbol/geometry to get animation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;You can see some code to animate a graphics overlay graphic in an Esri Community response here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/make-a-pulse-animation-in-agspicturegraphics/m-p/136855#M1274" target="_blank"&gt;https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/make-a-pulse-animation-in-agspicturegraphics/m-p/136855#M1274&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Let us know if you have more questions!&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 16:40:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1229228#M7481</guid>
      <dc:creator>MarkDostal</dc:creator>
      <dc:date>2022-11-07T16:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Vector graphics for current location</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1229283#M7482</link>
      <description>&lt;P&gt;Thanks Mark.&lt;/P&gt;&lt;P&gt;I did add your code in, and I am not seeing the red polygon on the map.&amp;nbsp; I still see the blue dot for current position, or nothing if I turn it off with showLocation = false.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 18:57:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1229283#M7482</guid>
      <dc:creator>decay</dc:creator>
      <dc:date>2022-11-07T18:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Vector graphics for current location</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1229305#M7483</link>
      <description>&lt;P&gt;When are you setting the symbol on the mapView.locationDisplay?&lt;/P&gt;&lt;PRE&gt;mapView.locationDisplay.defaultSymbol = symbol&lt;/PRE&gt;&lt;P&gt;In my test code, I put it in the `viewDidLoad()` method to ensure that the mapView was visible on the screen.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 19:40:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1229305#M7483</guid>
      <dc:creator>MarkDostal</dc:creator>
      <dc:date>2022-11-07T19:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Vector graphics for current location</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1229312#M7484</link>
      <description>&lt;P&gt;It's in a function that gets called at as the last line in viewDidLoad()&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 20:13:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1229312#M7484</guid>
      <dc:creator>decay</dc:creator>
      <dc:date>2022-11-07T20:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Vector graphics for current location</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1229329#M7485</link>
      <description>&lt;P&gt;That's good (that it's called in `viewDidLoad()`). &amp;nbsp;Can you check what `autoPanMode`, the location display is in (some modes use different symbols)? &amp;nbsp;Or you can try setting all the `locationDisplay` symbols:&lt;/P&gt;&lt;LI-CODE lang="swift"&gt; mapView.locationDisplay.accuracySymbol = symbol
 mapView.locationDisplay.acquiringSymbol = symbol
 mapView.locationDisplay.headingSymbol = symbol
 mapView.locationDisplay.courseSymbol = symbol&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, you can try setting the symbol to a basic symbol, to see if the issue is with the multi-layer symbol or not:&lt;/P&gt;&lt;LI-CODE lang="swift"&gt;mapView.locationDisplay.defaultSymbol = AGSSimpleMarkerSymbol(style: .diamond, color: .green, size: 24.0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Mark&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 20:44:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1229329#M7485</guid>
      <dc:creator>MarkDostal</dc:creator>
      <dc:date>2022-11-07T20:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Vector graphics for current location</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1229331#M7486</link>
      <description>&lt;P&gt;Mark,&lt;/P&gt;&lt;P&gt;The issue appeared to be using the AGSSimulatedLocationDataSource for location updates.&amp;nbsp; When I turned that off, the red square appeared.&amp;nbsp; The location indicator is totally different.&amp;nbsp; Is there any way to change the indicator for a simulated data source?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 20:56:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1229331#M7486</guid>
      <dc:creator>decay</dc:creator>
      <dc:date>2022-11-07T20:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Vector graphics for current location</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1229367#M7487</link>
      <description>&lt;P&gt;Setting the courseSymbol property with the AGSSimulatedLocationDataSource did the trick.&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;Is there any way to coerce an AGSModelSceneSymbol to be used as the location indicator?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 22:48:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1229367#M7487</guid>
      <dc:creator>decay</dc:creator>
      <dc:date>2022-11-07T22:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Vector graphics for current location</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1229666#M7489</link>
      <description>&lt;P&gt;Unfortunately, the location display is only available in 2D and the `AGSModelSceneSymbol` is a 3D symbol, so that won't be possible.&lt;/P&gt;&lt;P&gt;If you can get the list of points out from the model, you should be able to create an `AGSPolygon` to display it as in the example above.&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 20:21:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/custom-vector-graphics-for-current-location/m-p/1229666#M7489</guid>
      <dc:creator>MarkDostal</dc:creator>
      <dc:date>2022-11-08T20:21:39Z</dc:date>
    </item>
  </channel>
</rss>

