I have try geocode to get my lat and lon , but not current

it is get by my ip and conver to lat,lon

Can help me osm(openstreetmap) api can get my current lat and lon?

import geocoder
g = geocoder.ip('me')


freegeoip = "http://freegeoip.net/json"
geo_r = requests.get(freegeoip)
geo_json = geo_r.json()

user_postition = [geo_json["latitude"], geo_json["longitude"]]


asked 13 Aug '17, 09:50

Arvis_Su's gravatar image

accept rate: 0%

edited 13 Aug '17, 09:50

OpenStreetMap doesn't offer a geolocation API. However you can find various geolocation services and databases on the Internet. Some of them are mentioned here: https://opendata.stackexchange.com/questions/2087/ip-geocoding-data-sources-and-or-apis

permanent link

answered 14 Aug '17, 08:20

scai's gravatar image

scai ♦
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 13 Aug '17, 09:50

question was seen: 5,600 times

last updated: 14 Aug '17, 08:20

powered by OSQA