geolocation

Is there any possible way to find the name of the country using IP with scripting language PHP?

我是研究僧i 提交于 2019-11-27 19:04:15
问题 Is there any possible way to find the name of the country using IP with scripting language PHP ? 回答1: Depending on your needs at a budget level and an accuracy level there are a few options: IPGeo: www.ipgeo.com (Free option) MaxMind GeoIP:http://www.maxmind.com/ (Free option) Quova: http://quova.com/ (Paid) NetAcuity by Digital Element/Envoy: http://www.digital-element.com/ (Paid) Digital Envoy is the inventor of the IP Intelligence space, has the richest dataset of all the providers, and is

Determine iPhone user's country

风流意气都作罢 提交于 2019-11-27 19:03:36
I need to determine at startup what country a user is in, for an iPhone application. Presumably I will have to turn on location services and do some sort of reverse geocoding. I don't really want to use a third party web service if possible, are there any other suggestions for determining country from what location services provides? Initially, I only need to check whether the user is inside the US or not, but this may change in the future to add more countries. I understand that location can not always be determined or the user may have location services turned off. Basically, I just need to

Return distance in elasticsearch results?

早过忘川 提交于 2019-11-27 18:59:56
My question is similar to this one . Simply, is there a way to return the geo distance when NOT sorting with _geo_distance? Update: To clarify, I want the results in random order AND include distance. Yes you can, by using a script field . For instance, assuming your doc have a geo-point field called location , you could use the following: (note the \u0027 is just an escaped single quote, so \u0027location\u0027 is really 'location' ) curl -XGET 'http://127.0.0.1:9200/geonames/_search?pretty=1' -d ' { "script_fields" : { "distance" : { "params" : { "lat" : 2.27, "lon" : 50.3 }, "script" : "doc

Android: How to get location information from intent bundle extras when using LocationManager.requestLocationUpdates()

你。 提交于 2019-11-27 18:49:31
I am trying to use Android's LocationManager requestLocationUpdates. Everything is working until I try to extract the actual location object that in my broadcast receiver. Do I need to specifically define the "extras" to my custom intent so that the Android LocationManager before I pass it to requestLocationUpdates so it knows how to add it into the intent, or will it create the extras-bundle regardless when it passes the fired intent to the broadcast receiver? My code looks like this: Intent intent = new Intent("com.myapp.swarm.LOCATION_READY"); PendingIntent pendingIntent = PendingIntent

Geolocation web service recommendations

半世苍凉 提交于 2019-11-27 18:46:17
问题 Does anyone have any recommendations on geolocation web services (preferably free!)? Planning on using it in an asp.net app, I'd heard Google might have something. 回答1: We use the Google Maps API and it's very straightforward to use. It takes some figuring out to begin with, but we were up and running using the geocoding portion in less than a day. 回答2: MaxMind is not free, but their SaaS (web service) offering is VERY reasonably priced. 回答3: I am a happy user of geocoder.us. 回答4: I'm fairly

Android get location or prompt to enable location service if disabled

孤街浪徒 提交于 2019-11-27 18:37:31
I've found bits and pieces of this answer scattered through other posts, but I wanted to record it here for others. How can I simply request the user's GPS and/or Network location and, if they haven't enabled the service, prompt them to do so? If you want to capture the location on a button push, here's how you'd do it. If the user does not have a location service enabled, this will send them to the settings menu to enable it. First, you must add the permission "android.permission.ACCESS_COARSE_LOCATION" to your manifest. If you need GPS (network location isn't sensitive enough), add the

Latitude and Longitude based on Zip Code [closed]

半腔热情 提交于 2019-11-27 18:35:14
My requirement is to get the Latitude and Longitude value for a particular zip code. Is there any API that I can use to get these information. As I am working in a company so the requirement is coming for our team is to find the latitude and longitude value for a particular zip code. So we were thinking to build a new service for this. So what reliable data source we can use to get these information back if we are passing zip code to our service. Or what can be the best approach that I can propose to my PM about this requirement. Any pointers will be appreciated. Just to add, that data source

Google Geolocation API library

我的未来我决定 提交于 2019-11-27 18:31:53
问题 Is there a library out there that will get you your approximate location using the google service (https://www.google.com/loc/json)? Google Gears has support for it as described here http://code.google.com/p/gears/wiki/GeolocationAPI There is also good doco on the web service request/response schema. Firefox and iPhone Safari use the service as well and they have their own implementations. I would like to use the service in my own C# application so I would like a library that I can use

How to continuously track the location of an Android mobile phone?

独自空忆成欢 提交于 2019-11-27 18:25:53
I need to write an app, which every 5 minutes determines the current location of the mobile phone (using all free, available location providers) and sends it to a server. If some location provider doesn't work at the start of the application, but becomes available later, the application should process its location data as well. In order to do this, I implemented following class. In one of my activities, I create an instance of it and call its startTrackingUpdates method. locationChangeHandler does the processing of location data. public class LocationTracker implements ILocationTracker,

What's the simplest way to get a user's latitude and longitude from an ip address [closed]

人走茶凉 提交于 2019-11-27 18:12:47
I always end up needing the user's location on most web projects that I work on. I've used Maxmind's GeoIp , but it involves you importing their dataset and it needs constant updating. There are also other free and paid services, but I just wanted something simple that I could add to any site in a matter of seconds. So this is sort of baited because I have a simple solution, detailed below, but I wanted to see if anyone else uses this technique and if there are any better solutions or if there are some unforeseen pitfalls. The implementation I currently use I've seen in a couple other