6

I have a GPS class which returns lat, long. And I'm trying to get the city name or address from that coordinates with geocoder. It works well.

But, is it possible to get city name or anything without geocoder or (lat-long)?

Peter O.
  • 32,158
  • 14
  • 82
  • 96
Rohit suvagiya
  • 1,005
  • 2
  • 12
  • 40
  • 1
    hey @iphonic Rohit wants without using DB if there is any services (JSON) available than that he wants to use B'coz you say some DB is up to 30 MB than it will not the proper solution. – JAY RAPARKA Jul 02 '15 at 06:39
  • MaciekWroclaw Don't use Geocoder – Rohit suvagiya Jul 02 '15 at 06:40
  • @iphonic Ya thanks for trying to help him – JAY RAPARKA Jul 02 '15 at 06:41
  • @MaciekWrocław OP don't want to use the GeoCoder. Please check the question – Ashish Kakkad Jul 02 '15 at 06:41
  • 1
    @Rohitsuvagiya Check this : http://stackoverflow.com/questions/23799864/how-to-get-the-users-current-city-name-without-using-the-core-location-service may you get help from it. – Ashish Kakkad Jul 02 '15 at 06:43
  • @JAYRAPARKA What do you mean by geocoder? I thought OP doesn't want to go online, there is always google api for you to achieve this, you can get any kind of data by that json/xml. Check link [here](https://www.google.co.in/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=google%20maps%20api%20get%20city%20name%20from%20coordinates) – iphonic Jul 02 '15 at 06:44
  • @iphonic still don't get my point friend we don't want to pass any lat-long to service means any services which takes lat-long we don't want it's our challanging task so that's y we posting here. – JAY RAPARKA Jul 02 '15 at 06:49
  • @iphonic If you have any other idea to find location without lat-long than will be appreciate. – JAY RAPARKA Jul 02 '15 at 06:50

1 Answers1

4

I have completed task use this api:

http://ip-api.com/json

This will give you your current location from your IP address very simply just call this JSON and you got whatever you required.

Rohit suvagiya
  • 1,005
  • 2
  • 12
  • 40