How to Access GPS from Runtime Application

987
3
11-22-2011 10:22 AM
Labels (1)
gangzhong
New Contributor
I have a scenario where the users would like to be able to display on the map their current location from a GPS unit connected to the PC.

Is this even possible? I looked through the API Reference and didn't see GPS related classes yet. Anyway, if it is possible, anybody have any pointers to get me started?

Thanks,

Gang
0 Kudos
3 Replies
MichaelBranscomb
Esri Frequent Contributor
Hi,

In Beta 1 there was not any GPS support within the API (although you could of course use .NET or 3rd party GPS libraries and use the GraphicsLayer to display the location).

In Beta 2 we've added a GPSLayer class and a GPS library which enables you to connect to Serial Port and File-based GPS NMEA streams. The GPSLayer will work with any thing which implements the IGeoPositionWatcher interface which means it will hook into the new Sensor and Location Platform on Windows 7. This uses your IP address to locate you by default but you can install other location sensors, such as the Geosense for Windows sensor (http://geosenseforwindows.com/) which, if you are connected to a WIFI network, will use the SSID of that network to locate you. You cam also implement fake GPS feeds - Morten Nielsen has written an article with a couple of examples: http://sharpgis.net/post/2010/12/09/Simulating-GPS-on-Windows-Phone-7.aspx.

As I said - this is all in Beta 2 which should be available within the next few weeks.


Cheers

Mike
0 Kudos
MichaelErlich
New Contributor II
Depending on needs, may want to build your own and display symbol on the map.  Possible things to consider:
What type of feed?  NMEA, TAIP, or proprietary by modem manufacturer.
What transport is available? Serial/TCP/UDP.

If you have simple needs, then beta two will suffice.  However, if you are like us with more complex scenarios, then you will need to roll your own.  Start by searching for the specifications for NMEA and/or TAIP and either build your own or search for a sufficient open source project.  Building one is not really as hard as it sounds as the sentences provided are documented well and easy to parse.
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi Michael,

The GPS support due in Beta 2 is an excellent start but I'd be very keen to hear your requirements for more advanced GPS functionality. If you'd rather not post specific details in the forum then please email me: mbranscomb@esri.com.

Cheers

Mike
0 Kudos