GPS coordinates are available only in mobile browsers. What you are discussing is geolocation in general. Your desktop or laptop does not have a GPS device. Location is expressed in latitude and longitude.
For iOS, an iOS emulator is used. You can set fake GPS coordinates. You can download it from developer.apple.com.
For Android, use the Android emulator. You can set fake GPS coordinates. Google Android SDK.
For other browsers / mobile sellers, download the appropriate emulator.
Desktop browsers do not use GPS data. They use IP or WLAN based location. For desktop browsers, just write your own test stub for navigator.geolocation.
source share