<?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: GPSLayer Position in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/gpslayer-position/m-p/46322#M211</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Johan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am having the same problem, and have run into a wall. Did you ever find a solution to this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tom&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jul 2013 18:27:12 GMT</pubDate>
    <dc:creator>TomGiles</dc:creator>
    <dc:date>2013-07-08T18:27:12Z</dc:date>
    <item>
      <title>GPSLayer Position</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/gpslayer-position/m-p/46321#M210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Im using a SerialPortGPSCoordinateWatcher to receive GPS signals from a USB GPS device which i connect to a GPSLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It works fine, i retrieve signals and GeoCoordinates but the position property of my GPSLayer is null? Do i have to do anything special to retrieve the Map position of the GPSLayer? I also have a valid spatialreference on my map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/Johan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 11:07:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/gpslayer-position/m-p/46321#M210</guid>
      <dc:creator>JohanWennberg1</dc:creator>
      <dc:date>2013-02-25T11:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: GPSLayer Position</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/gpslayer-position/m-p/46322#M211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Johan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am having the same problem, and have run into a wall. Did you ever find a solution to this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tom&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 18:27:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/gpslayer-position/m-p/46322#M211</guid>
      <dc:creator>TomGiles</dc:creator>
      <dc:date>2013-07-08T18:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: GPSLayer Position</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/gpslayer-position/m-p/46323#M212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please you post a snippet of your code to help ascertain what might be the issue?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 08:24:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/gpslayer-position/m-p/46323#M212</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2013-07-11T08:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: GPSLayer Position</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/gpslayer-position/m-p/46324#M213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just solved it, a rather silly mistake. I was simply accessing the position too early; once accessed through the Position_Changed event I can access it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I do have a follow-up question for you Mike:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When accessing the GeoPositionWatcher I see some of the methods, eg:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Console.WriteLine(gpsLayer.GeoPositionWatcher.Position.Location.HorizontalAccuracy.ToString)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but not all as seen in the Advanced GPS Information sample, eg:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;TextBlock Text="{Binding Position.Location.FixStatus&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;TextBlock Text="{Binding Position.Location.FixSatelliteCount&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;TextBlock Text="{Binding Position.Location.CourseMagnetic&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;TextBlock Text="{Binding Position.Location.GeoidHeight&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I realize you bind to those properties in XAML. I can only access Altitude, Course, Speed, Lat, Long and the horiz and vert accuracies. I am looking for FixSatelliteCount.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can I access them code side, from the Position_Changed function?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tom&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2013 17:53:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/gpslayer-position/m-p/46324#M213</guid>
      <dc:creator>TomGiles</dc:creator>
      <dc:date>2013-07-12T17:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: GPSLayer Position</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/gpslayer-position/m-p/46325#M214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To further my last post, this is the code I am using to create the gpsLayer, and code for Position_Changed, where I try and access the properties I mentioned (those which I seem unable to access). Am I going about this the wrong way?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Public Class GpsTool
 Private gpsLayer As GpsLayer
 Private _locationWatcher As IGeoPositionWatcher(Of Geocoordinate)
 Private _isStarted As Boolean


'in sub New()
Public Sub New(map As Map)
 gpsLayer = New GpsLayer()


'when button is pressed for gps-on
Private Sub gpsButtonClick...
 _isStarted = True
 ThreadPool.QueueUserWorkItem(DirectCast(Sub() CreateGpsWatcher(ESRI.ArcGIS.Client.Local.Gps.SerialPortGpsCoordinateWatcher.FindEnabledPort(1)), WaitCallback))


Private Sub CreateGpsWatcher(serialPorts as List(Of String))
 'dispatcher code

 'if device found
 _locationWatcher = New ESRI.ArcGIS.Client.Local.Gps.SerialPortGpsCoordinateWatcher() With {
&amp;nbsp; .portName = serialPorts(0) _
 }

 'geometry service for projections

 gpsLayer.GeoPositionWatcher = _locationWatcher
 gpsLayer.GeoPositionWatcher.Start()

 AddHandler gpsLayer.PositionChanged, AddressOf gpsPosition_Changed



'Then in gpsPosition_Changed - this is where I am accessing the properties of the gpsLayer, such as:
Private Sub gpsPosition_Changed(sender As Object, args As EventArgs)
 Console.WriteLine(gpsLayer.GeoCoordinate.Altitude.ToString)

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is in that last function that I do not see the properties that you guys have used in the sample app, through XAML.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for any light people can shed on this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tom&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:49:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/gpslayer-position/m-p/46325#M214</guid>
      <dc:creator>TomGiles</dc:creator>
      <dc:date>2021-12-10T21:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: GPSLayer Position</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/gpslayer-position/m-p/46326#M215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Still working on this..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Recent development - the tooltip on my GpsPositionWatcher showed it as being from System.Device.Location.GeoCoordinate, not gpsLayer.GeoCoordinate&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This reference is from the ArcGIS API for WPF (not runtime api)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"By default the position watcher used is Windows Phone's built-in System.Device.Location.GeoCoordinateWatcher. Overriding this makes it possible to assign a simulator instead."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do I need to override the default GeoCoordinateWatcher to gain access to all the gpsLayer properties? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(The true GPS seems to be working, it's accurate within a couple meters.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tom&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 15:43:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/gpslayer-position/m-p/46326#M215</guid>
      <dc:creator>TomGiles</dc:creator>
      <dc:date>2013-07-30T15:43:51Z</dc:date>
    </item>
  </channel>
</rss>

