Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPS location #445

Open
vijaygrg27 opened this issue Aug 20, 2021 · 1 comment
Open

GPS location #445

vijaygrg27 opened this issue Aug 20, 2021 · 1 comment

Comments

@vijaygrg27
Copy link

How to use geocoder to track live location? I am creating an application to track my current location.

I have used the below code but it's not tracking my location .

import geocoder

g = geocoder.ip("me")
props = g.geojson["features"][0]["properties"]
lat = props["lat"]
lon = props["lng"]
print(lat, lon)

Please help

@remi-sap
Copy link

You example works for me.
This geocoding service uses the incoming IP address which doesn't change if internet access is provided by a mobile phone or a 4G hotspot.

IP address is not an accurate signal to use for location tracking. Better try your luck with a wifi based positioning system or just use a device with a gps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants