geolocation

Get a user's State with Geolocation

不问归期 提交于 2019-12-03 05:02:40
What's the most efficient way to get a United States user's State? Is HTML5 Geolocation an option without needing to involve google maps? Marcel Here's a couple of examples in JavaScript and JSON (with the help of jQuery ) using both the IP lookup method (with the help of IPinfoDB ) and the Geolocation API method (with the help of Google Maps API and YQL ). In both examples I'm retrieving the region and country but there are several values you can choose from. Be aware these examples don't do any error handling and here they are edited for brevity, otherwise see the full demo . IP Lookup in

iOS Location Services visits and system Frequent Location

左心房为你撑大大i 提交于 2019-12-03 04:53:12
I noticed that Frequent Location on iPhone seems to use much less battery than an app monitoring iOS Visits ( https://developer.apple.com/reference/corelocation/clvisit ). Frequent location on iPhone can be viewed on the phone via Settings -> Privacy -> Location Services -> System Services -> Frequent Locations. I would like to know if Visit monitoring service from CLLocationManager is the same as iOS Frequent location or is it on different system used by Apple. If Apple is using the same service why it does not have any impact on the battery? Joshua Briefman The two APIs are intended for

Geolocation with IPv6?

岁酱吖の 提交于 2019-12-03 04:23:07
问题 I'm working on an IP geolocation library that uses the first three octets of an IPv4 address to determine a user's country, city, lat, lon, etc. Works like a charm. But it doesn't handle IPv6 addresses, and I'd like it to do so. Is there any way to transform an IPv6 address to get the equivalent of the first three octets of an IPv4 address, or are they on an entirely different numbering scheme, requiring a completely different ipgeo mapping? 回答1: The typical IPv6 allocation is a /32 (four

Current URL To Download KML Data From Google Location History?

心已入冬 提交于 2019-12-03 04:22:40
问题 I need to download google location history data in kml for a period of time. Up until August 26, 2015, a URL in this format worked: https://maps.google.com/locationhistory/b/0/kml?startTime=$start_seconds&endTime=$end_seconds Now a link in that format fails. I suspect the problem is related to google changing the way its website displays location history, though that change happened nearly a month earlier on July 22. A commenter on the google products forum suggested this: [T]he KML

Detecting geographic clusters

断了今生、忘了曾经 提交于 2019-12-03 04:19:38
问题 I have a R data.frame containing longitude, latitude which spans over the entire USA map. When X number of entries are all within a small geographic region of say a few degrees longitude & a few degrees latitude, I want to be able to detect this and then have my program then return the coordinates for the geographic bounding box. Is there a Python or R CRAN package that already does this? If not, how would I go about ascertaining this information? 回答1: I was able to combine Joran's answer

ocean latitude longitude point distance from shore

僤鯓⒐⒋嵵緔 提交于 2019-12-03 04:18:31
I started a "free" open-sourced project to create a new data set for pH of the earth oceans. I started from the open data-set from NOAA and created a 2.45 millions rows data-set with those columns: colnames(NOAA_NODC_OSD_SUR_pH_7to9) [1] "Year" "Month" "Day" "Hour" "Lat" "Long" "Depth" "pH" Method document HERE . Data-set HERE . My goal now is to "qualify" each row (2.45m)... to do so, I need to calculate the distance from each point of Lat/Long to the nearest shore. So I am looking for a method that would take In: Lat/Long Out: Distance (km from shore) With this, I can qualify if the data

What is meaning of negative dbm in signal strength?

天涯浪子 提交于 2019-12-03 04:11:59
问题 When we try to get nearby cells and their LAC, MNC, signal (and while using other android apps) we are getting signal as negative value (like -85dbm). How should I take this? Should I ignore -ve sign and take absolute value or -85 is smaller strength than -60? How this will affect my location finding? 回答1: The power in dBm is the 10 times the logarithm of the ratio of actual Power/1 milliWatt. dBm stands for "decibel milliwatts". It is a convenient way to measure power. The exact formula is P

Querying MySQL for latitude and longitude coordinates that are within a given mile radius

一个人想着一个人 提交于 2019-12-03 03:58:23
I currently have a MySQL table that is structured as follows: id name lon lat ----- ----- ----------- ----------- 1 Mark -76.316528 40.036027 2 John -95.995102 41.25716 3 Paul -82.337036 29.645095 4 Dave -82.337036 29.645095 5 Chris -76.316528 40.036027 The way I currently query the DB to see if a user's location is within a certain mile radius of a given location is by doing this. function Haversine($lat_from, $lon_from, $lat_to, $lon_to) { $radius = 6371000; $delta_lat = deg2rad($lat_to-$lat_from); $delta_lon = deg2rad($lon_to-$lon_from); $a = sin($delta_lat/2) * sin($delta_lat/2) + cos

Web service to find nearby points of interest?

帅比萌擦擦* 提交于 2019-12-03 03:56:39
I'm looking for a paid or free service that can return geographic points of interest within a given proximity (e.g. 10km) filtered by category, such as "Restaurants". Factual looks promising, but doesn't support my country - South Africa. The Google Places API is still in developer preview. There must be a mature online service that can act as an "online GPS" for finding nearby places? GeoNames API returns geolocated Wikipedia articles located near given point: http://www.geonames.org/export/wikipedia-webservice.html SimpleGeo API returns info about given point https://simplegeo.com/docs/api

HTML5 Geolocation implementation

荒凉一梦 提交于 2019-12-03 03:53:37
I have a list of areas and lattitude/longitude which I'm asking the user to select their location when they hit my site. I'd like to have their location prefilled using HTML5's geolocation if possible, but I'm not exactly sure the best way to do that. There seems to be a lack of tutorials on the web, at least from what I can find. Has anyone done this? Do you know of a good tutorial/resource? update If I have coordinates of bunch of cities, how can I use javascript to determine the closest location? Try this example: window.onload = function(){ if(navigator.geolocation) navigator.geolocation