<?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: Why doesn't LocationDisplay.setCourseSymbol() work. in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/why-doesn-t-locationdisplay-setcoursesymbol-work/m-p/343724#M2239</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you call LocationDisplay.startAsync() inside the LocationDisplay.addDataSourceStatusChangedListener(), you will only have to call setCourseSymbol() once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (dataSourceStatusChangedEvent.isStarted()){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;mLocationDisplay.startAsync();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;SimpleMarkerSymbol simpleMarkerSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.CROSS,&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Color.RED, 14);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;mLocationDisplay.setCourseSymbol(simpleMarkerSymbol);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;return;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This even listener gets called whenever there is a change in the status of the location data source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jose&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 Dec 2019 00:02:26 GMT</pubDate>
    <dc:creator>JoseBanuelos</dc:creator>
    <dc:date>2019-12-28T00:02:26Z</dc:date>
    <item>
      <title>Why doesn't LocationDisplay.setCourseSymbol() work.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/why-doesn-t-locationdisplay-setcoursesymbol-work/m-p/343721#M2236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following happens after I call LocationDisplay.setCourseSymbol&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTHING.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You are still using the same symbol that you always were.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can even verify this in the debugger.&lt;/P&gt;&lt;P&gt;When setting up attributes for LocationDisplay, I call setCourseSymbol.&lt;/P&gt;&lt;P&gt;I call getCourseSymbol just to make sure it is there. Yep.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Later, after calling LocationDisplay.startAsync(), I want to check it.&lt;/P&gt;&lt;P&gt;I call getCourseSymbol.&lt;/P&gt;&lt;P&gt;It returns your default symbol as if nothing had ever happened.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHY?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Dec 2019 21:34:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/why-doesn-t-locationdisplay-setcoursesymbol-work/m-p/343721#M2236</guid>
      <dc:creator>NathanMellor</dc:creator>
      <dc:date>2019-12-21T21:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't LocationDisplay.setCourseSymbol() work.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/why-doesn-t-locationdisplay-setcoursesymbol-work/m-p/343722#M2237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to the LocationDisplay documentation, the setCourseSymbol() method can be used if isCourseSymbolOnMovement() is true. This boolean is set to true "when location updates indicate the device is moving. If no course information is available, the default symbol will be used instead". This means that in order to view the&amp;nbsp;new symbol you set, the device needs to be moving, or appear to be moving (if using a gps spoof app).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As long as you call the setCourseSymbol() method after calling LocationDisplay.startAsync(), and your device/emulator is moving (or&amp;nbsp;simulates movement), the you will be able to see the symbol you set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-android/tree/master/java/display-device-location"&gt;display-device-location&lt;/A&gt;&amp;nbsp;sample app to test and confirm this. Here is the source code I added to test:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;//MainActivity.java&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;//code added under the case 1 switch statement for the mSpinner.setOnItemSelectedListener(...)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;mLocationDisplay.startAsync(); //original code from sample app&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt; SimpleMarkerSymbol simpleMarkerSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.CROSS,&lt;BR /&gt; Color.RED, 12);&lt;BR /&gt; mLocationDisplay.setCourseSymbol(simpleMarkerSymbol);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I turned off the gps spoof app, the symbol would not display. Once I started the spoof app to simulate movement from the emulator/device, the symbol appears. Here is a screenshot below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/477103_locationDisplay.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Jose&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Dec 2019 21:55:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/why-doesn-t-locationdisplay-setcoursesymbol-work/m-p/343722#M2237</guid>
      <dc:creator>JoseBanuelos</dc:creator>
      <dc:date>2019-12-27T21:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't LocationDisplay.setCourseSymbol() work.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/why-doesn-t-locationdisplay-setcoursesymbol-work/m-p/343723#M2238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;BR /&gt;&lt;P&gt;As long as you call the setCourseSymbol() method after calling LocationDisplay.startAsync(), and your device/emulator is moving (or&amp;nbsp;simulates movement), the you will be able to see the symbol you set.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The part about calling it after calling LocationDisplay. startAsync() is not mentioned in the documentation. &lt;/P&gt;&lt;P&gt;I tried calling setCourseSymbol at the beginning, at the same time I call things like setNavigationPointHeightFactor and setInitialZoomScale&lt;/P&gt;&lt;P&gt;After all LocationDisplay can be started and stopped multiple times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I guess you have to set it everytime you call startAsync, or the change gets overridden.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Dec 2019 22:34:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/why-doesn-t-locationdisplay-setcoursesymbol-work/m-p/343723#M2238</guid>
      <dc:creator>NathanMellor</dc:creator>
      <dc:date>2019-12-27T22:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't LocationDisplay.setCourseSymbol() work.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/why-doesn-t-locationdisplay-setcoursesymbol-work/m-p/343724#M2239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you call LocationDisplay.startAsync() inside the LocationDisplay.addDataSourceStatusChangedListener(), you will only have to call setCourseSymbol() once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (dataSourceStatusChangedEvent.isStarted()){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;mLocationDisplay.startAsync();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;SimpleMarkerSymbol simpleMarkerSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.CROSS,&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Color.RED, 14);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;mLocationDisplay.setCourseSymbol(simpleMarkerSymbol);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;return;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This even listener gets called whenever there is a change in the status of the location data source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jose&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Dec 2019 00:02:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/why-doesn-t-locationdisplay-setcoursesymbol-work/m-p/343724#M2239</guid>
      <dc:creator>JoseBanuelos</dc:creator>
      <dc:date>2019-12-28T00:02:26Z</dc:date>
    </item>
  </channel>
</rss>

