geolocation

What python libraries can tell me approximate location and time zone given an IP address?

依然范特西╮ 提交于 2019-11-26 21:39:43
Looking to implement better geo-location with Python. Hostip.info is an open-source project with the goal to build/maintain a database mapping IP addresses to cities . Their about page explains the data sources relied on to populate this database. Using HostIP, there are two ways to get location data from an IP address: They also have a well-designed and easy-to-use RESTFUL API : just pass in your ip address after the i***p=*** in the GET request string): import urllib response = urllib.urlopen('http://api.hostip.info/get_html.php?ip=12.215.42.19&position=true').read() print(response) Second,

Calculating new longitude, latitude from old + n meters

痴心易碎 提交于 2019-11-26 21:38:56
I want to create 2 new longitude and 2 new latitudes based on a coordinate and a distance in meters, I want to create a nice bounding box around a certain point. It is for a part of a city and max ±1500 meters. I therefore don't think the curvature of earth has to be taken into account. So I have 50.0452345 (x) and 4.3242234 (y) and I want to know x + 500 meters, x - 500 meters, y - 500 meters, y + 500 meters I found many algorithms but almost all seem to deal with the distance between points. nibot The number of kilometers per degree of longitude is approximately (2*pi/360) * r_earth * cos

Geolocation in Safari 5

白昼怎懂夜的黑 提交于 2019-11-26 21:16:14
问题 I have a application which reports my location using HTML5 geolocation. The application works correct on Firefox and Chrome, but on Safari 5, it says that Safari does not support Geolocation. From what I read, Safari 5 does support Geolocation. What am I missing? Thanks for your time. Sunil 回答1: Looks like Safari geolocation only works when connected with wifi. When connected with a wired connection Safari calls the error callback from the geolocation functions. To test this, try this in the

How to calculate distance from Wifi router using Signal Strength?

南楼画角 提交于 2019-11-26 21:09:26
I would like to calculate the exact location of a mobile device inside a building ( so no GPS access) I want to do this using the signal strength(in dBm) of at least 3 fixed wifi signals(3 fixed routers of which I know the position) Google already does that and I would like to know how they figure out the exact location based on the this data Check this article for more details : http://www.codeproject.com/Articles/63747/Exploring-GoogleGears-Wi-Fi-Geo-Locator-Secrets FSPL depends on two parameters: First is the frequency of radio signals;Second is the wireless transmission distance. The

is there a good PHP geolocation service? [closed]

巧了我就是萌 提交于 2019-11-26 21:06:27
i am looking for a good PHP geolocation service, so when i start my app i can have something like: <?php $service = new GeoLocService(); echo $service->getLat(); echo $service->getLng(); ?> to retrieve the position of the user in latitude and logitude values. Geo-location would need to be done in the browser, since the server (ie PHP) would never get to find out most of the relevant data. The main API for doing geolocation in the browser is Google's, but you as a developer wouldn't need to use that API; you'd use the browser's API, which is standardised (though only supported in a few browsers

Get user's location (latitude, longitude) with Bing or Google Maps API

让人想犯罪 __ 提交于 2019-11-26 20:58:52
问题 is there a way to retrieve a latitude & longitude of the user using Bing Maps API or Google Maps API. I think I saw an code snippet where a "autolocate me" feature was used to mark user on the Map itself: var geoLocationProvider = new Microsoft.Maps.GeoLocationProvider(map); geoLocationProvider.getCurrentPosition(); But that function doesn't return any data, it simply set location on the map, whereas I need that location to perform some calculations, namely calculate which of predefined list

how to find the distance between two geopoints?

↘锁芯ラ 提交于 2019-11-26 20:58:15
问题 double distance; Location locationA = new Location("point A"); locationA.setLatitude(latA); locationA.setLongitude(lngA); Location locationB = new Location("point B"); locationB.setLatitude(latB); LocationB.setLongitude(lngB); distance = locationA.distanceTo(locationB); the above code is not working and i am getting 0.0 Km as distance? Also in the constructor of the location class, what does the string provider mean. In the above code i am using PointA and PointB as the providers. why is the

Geo Location based on IP Address - PHP [closed]

半腔热情 提交于 2019-11-26 20:21:14
We're looking for a fast and accurate way to get the visitors location based on their IP. We have tried ipinfodb.com but their API made our website severely lag when making the API call. What other services do you suggest? David Croft Get Geo-IP Information Requests a geo-IP-server (netip.de) to check, returns where an IP is located (host, state, country, town). <?php $ip='94.219.40.96'; print_r(geoCheckIP($ip)); //Array ( [domain] => dslb-094-219-040-096.pools.arcor-ip.net [country] => DE - Germany [state] => Hessen [town] => Erzhausen ) //Get an array with geoip-infodata function geoCheckIP(

check if location setting has been turned off in users browser

不想你离开。 提交于 2019-11-26 20:00:00
问题 I would like to hide() or show() a button that allows users to use their current location based on whether or not they are currently allowing location to be used in their browser setting. the below code only checks if the browser supports geolocation and not whether or not the particular user is allowing it. if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else { x.innerHTML="Geolocation is not supported by this browser.";} } Is there a boolean value that

How to get My Location changed event with Google Maps android API v2?

这一生的挚爱 提交于 2019-11-26 19:54:23
How to get My Location changed event with Google Maps android API v2 ? In v1 you can do the next in order to handle location changed event: public class MyLocationOverlay extends com.google.android.maps.MyLocationOverlay { /** * Listener */ public interface Listener { void onLocationChanged(android.location.Location location); } private Listener listener; public MyLocationOverlay(Context context, MapView mapView, Listener listener) { super(context, mapView); this.listener = listener; } @Override public synchronized void onLocationChanged(Location location) { super.onLocationChanged(location);