geolocation - Get user's current latitude and longitude in Java -


i see question asked lot here java, every single 1 see seems android-centered: need way of getting user's current latitude , longitude when call coming computer, not mobile device. know doable in c#, i'm not sure how in java. i've used google maps' restful api before: however, wants address input, , want user's current lat/lon, feel simpler making call google. appreciated.

java doesn't provide general platform-independent api location. however, there may platform-specific ways.

most implementations on desktop machine geolocate via ip address; can use these services java (best way geo-location in java). however, if operating systems provide more general api, can take advantage of gps hardware.

for mac os, https://superuser.com/questions/346302/is-there-a-way-to-access-os-x-location-services-from-the-command-line

there's detail here of gnome-provided library, , write-up of plans support in kde.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -