Presented by Ignas Šeškauskas Location Presented by Ignas Šeškauskas
Content Introduction COM Interfaces Enumeration Types Windows.Device.Geolocation API
Introduction The Location API provides an easy way to retrieve data about geographic location while protecting user privacy. The Location API provides its functionality through a set of COM interfaces that represent objects. locationapi.h header is used by Location API
COM Interfaces ICivicAddressReport IDefaultLocation ILatLongReport ILocation ILocationEvents ILocationPower ILocationReport
ICivicAddressReport ICivicAddressReport represents a location report that contains information about: Street address City name Postal code Country/region
IDefaultLocation IDefaultLocation provides methods used to specify or retrieve the default location.
ILATLONGREport ILatLongReport represents a location report that contains information in the form of latitude and longitude.
ILocation ILocation provides methods used to manage location reports, event registration, and sensor permissions.
ILocationEvents ILocationEvents provides callback methods that you must implement if you want to receive event notifications. Methods: OnLocationChanged OnStatusChanged
ILocationPower ILocationPower is used by Windows Store app browsers in Windows 8 to notify the location platform that an app has been suspended (disconnect) and restored (connect). Methods: Connect() Disconnect()
ILocationReport ILocationReport is the parent interface for location reports. Methods: GetSensorID GetTimestamp GetValue
enumeration types Location_Desired_Accuracy Location_Report_Status Default High Location_Report_Status Report_Not_Supported Report_error Report_Access_Denied Report_Initializing Report_Running
Windows.Device.Geolocation API Provides APIs for getting the current location or tracking the device's location over time. The accuracy of the location information depends on the source. The latitude and longitude may vary within the following ranges: GPS : within approximately 10 meters Wi-Fi : between approximately 30 meters and 500 meters Cell towers : between approximately 300 meters and 3,000 meters IP address : between approximately 1,000 meters and 5,000 meters
References https://docs.microsoft.com/en-us/windows/desktop/locationapi/windows- location-programming-reference https://docs.microsoft.com/en-us/windows/desktop/locationapi/structures- and-enumeration-types https://docs.microsoft.com/en-us/windows/desktop/locationapi/com- interfaces https://docs.microsoft.com/en-us/uwp/api/Windows.Devices.Geolocation
THANKS FOR YOUR ATTENTION!