1 / 33

Building Location-Aware Applications with Windows 7 and .NET

CL17. Building Location-Aware Applications with Windows 7 and .NET. Gavin Gear Program Manager Microsoft Corporation. Garmin 60csx. Bing Maps vs. Reality Part 1. Bing Maps 3D Boiling Lake. Real Boiling Lake. Bing Maps vs. Reality Part 2. Real Seattle. Bing Maps 3D Seattle.

Lucy
Télécharger la présentation

Building Location-Aware Applications with Windows 7 and .NET

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CL17 Building Location-Aware Applications with Windows 7 and .NET Gavin Gear Program Manager Microsoft Corporation

  2. Garmin 60csx

  3. Bing Maps vs. Reality Part 1 Bing Maps 3D Boiling Lake Real Boiling Lake

  4. Bing Maps vs. Reality Part 2 Real Seattle Bing Maps 3D Seattle

  5. What About Location Awareness on the PC?

  6. Location Challenges on the PC (pre-Windows 7) • COM ports • Lack security model • Exclusive application access model • Proprietary data formats • Vertical solutions and Proprietary APIs

  7. Demo: Tour of Location in Windows 7 demo

  8. Windows 7 Sensor Platform C++ Sensor App C++ Sensor App Applications Sensor API Windows 7 Sensor and Location Platform Sensor Class Extension Sensor Driver Sensor Driver Sensor Devices Sensor MCU Sensor MCU Accelerometer Ambient Light Sensor

  9. Windows 7 Location Platform Location Gadget C++ Location App Applications IDispatch Win32 COM Location API Windows 7 Sensor and Location Platform Sensor API Lookup WAN GPS Location Sensors Default

  10. Windows 7 Location Data Flow Location Gadget C++ Location App Applications IDispatch Win32 COM Location API Windows 7 Sensor and Location Platform Sensor API Lookup WAN GPS Location Sensors Default

  11. Windows 7 Location Data Flow Location Gadget C++ Location App Applications IDispatch Win32 COM Location API Windows 7 Sensor and Location Platform Sensor API Lookup WAN GPS Location Sensors Default

  12. Windows 7 Location Summary • Standard platform for devices and applications • Windows 7 Sensor DDI (devices) • Windows 7 Location API (applications) • Security model and UI • Simultaneous application access • Standardized data types • Geo-position • Civic address

  13. .NET 4 Will Include a Managed Location API! Announcing New for Beta 2

  14. .NET 4 Location API .NET Applications .NET Location APP .NET Location APP .NET 4 Location API .NET Framework Windows 7 Location API Windows 7 Location API Sensor API Lookup WAN GPS Location Sensors Default

  15. New Assembly: System.Device.dll • Represents the device/PC • Root namespace: System.Device • Installed by default with .NET 4 • Supported in Visual Studio 2010

  16. System.Device.Location Object Model High-Level Overview GeoLocation GeoCoordinate GeoLocationProvider CivicAddress GeoLocationStatus

  17. GeoLocationProvider Overview • Properties • GeoLocation Location • GeoLocationStatus Status • Double MovementThreshold • Methods • GeoLocationProvider() +1 overload • Start() • Stop() • Events • LocationChanged • StatusChanged • Implements INotifyPropertyChanged

  18. GeoLocation Overview • Properties • Double Heading • Double Speed • GeoCoordinate Coordinate • CivicAddress Address • DateTimeOffset Timestamp • Methods • GeoLocation(GeoCoordinate) + 3 overloads • Members • GeoLocation Unknown

  19. GeoCoordinate Overview • Properties • Double Latitude • Double Longitude • DoubleHorizontalAccuracy • DoubleVerticalAccuracy • Double Altitude • Methods • GeoCoordinate(latitude, longitude) + 3 overloads • Members • GeoCoordinate Unknown

  20. CivicAddress Overview • Properties • String AddressLine1 • String AddressLine2 • String Building • String City • String CountryRegion • String FloorLevel • String PostalCode • String StateProvince • Methods • CivicAddress(String addressLine1, …) • Members • CivicAddress Unknown

  21. Writing a Location-Aware .NET application

  22. Restaurant Finder WPF App –“Suburban Fork”

  23. Suburban Fork Application Architecture Model View Model View Main Window Location View Model Map Layer Location Source Commands Globe Databinding Flag Panel

  24. Location Coding Considerations • Hooking up System.Device.dll • Using GeoLocationProvider • Accessing Location data and updates • Handling status and status updates • Conditional permissions prompting

  25. Coding Exercise Adding location-awareness to the Suburban Fork restaurant finder application

  26. .NET 4 Location Summary • .NET 4 includes a location API as of Beta 2 • Assembly: System.Device.dll • Namespace: System.Device • Windows 7 light up feature (Location data not available down-level) • Provides seamless access to default location, as well as hardware and software location providers

  27. Changes to Come in .NET 4 RC Build • Changes in RC Location API • Name changes • Address data access changes • Separation of status and permissions • Other minor changes

  28. Call to Action • Install Windows 7 • Install Visual Studio .NET 2010 Beta 2 • Build Location-aware applications using .NET 4 • Provide feedback to Microsoft about your experiences

  29. Resources • WHDC site for Sensors/Locationwww.microsoft.com/WHDC/Sensors • Documentation • Whitepapers • Developer forum • Blogs • Location inquiries aliaslocext@microsoft.com

  30. YOUR FEEDBACK IS IMPORTANT TO US! Please fill out session evaluation forms online at MicrosoftPDC.com

  31. Learn More On Channel 9 • Expand your PDC experience through Channel 9. • Explore videos, hands-on labs, sample code and demos through the new Channel 9 training courses. channel9.msdn.com/learn Built by Developers for Developers….

More Related