How to get the geolocation position based on the WiFi source always instead of the IPAddress

67883078 41 Reputation points
2024-07-19T10:46:29.9333333+00:00

Hi,

I would like to know how can I get the geolocation based on the WiFi source instead of the IP address. I was getting the geolocation based on the WiFi in last month in my Windows 11 system, but it started giving the geo location based on the IP address. its not accurate.

So, I would like to know how can I get the geolocation which calculated based on the WiFi source always.

Different source mentioned in the msdn

https://learn.microsoft.com/en-us/uwp/api/windows.devices.geolocation.positionsource?view=winrt-26100
I am using the GetGeopositionAsync to get the geo position.

https://learn.microsoft.com/en-us/uwp/api/windows.devices.geolocation.geolocator.getgeopositionasync?view=winrt-26100

I tried DesiredAccuracy and DesiredAccuracyInMeters, but no change.

Regards,

Banna

Universal Windows Platform (UWP)
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,635 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,984 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Arpit Verma 0 Reputation points
    2024-07-22T13:53:05.63+00:00

    To get the geolocation position based on the WiFi source instead of the IP address, you can use the following approaches:

    1. WiFi-based geolocation APIs:
      • Google's Geolocation API (Web): Uses WiFi and cell tower signals to determine location.
      • Apple's Location Services (iOS, macOS): Uses WiFi, GPS, and cell tower signals.
      • Android's LocationManager (Android): Uses WiFi, GPS, and cell tower signals.
    2. WiFi fingerprinting:
      • Collect WiFi access point (AP) information (SSID, BSSID, signal strength).
      • Use a database or API (e.g., OpenWLANMap, WiFiGeolocation) to match APs to locations.
    3. Third-party libraries and services:
      • Skyhook Wireless (SDK for iOS, Android, and Web).
      • LocationGuru (SDK for iOS and Android).
      • IP2Location (database and API for geolocation).

    When using these approaches, ensure you:

    • Handle user permissions and privacy concerns.
    • Check the accuracy and availability of the location data.
    • Consider fallback mechanisms (e.g., IP-based geolocation) when WiFi data is unavailable.

    Keep in mind that WiFi-based geolocation may not always be more accurate than IP-based geolocation, as it depends on various factors like WiFi AP density and signal strength.

    0 comments No comments