geolocation

Is there a way of detecting whether a user has already given permission to use navigator.geolocation?

不羁的心 提交于 2019-11-27 02:16:15
问题 Apart from setting a cookie the first time round, is there a way of detecting whether a user has already given permission for navigator.geolocation to return the lat/long of the browser? If there is, what is it and is it the same across all browsers or different across all browsers? This subject has been partially answered elsewhere According to GeoLocation API – Chrome / Safari – Permission management and Visual Differences, Chrome asks for a revokable one-time permission. I haven't finished

Is google.loader.clientlocation still supported

穿精又带淫゛_ 提交于 2019-11-27 02:04:12
I have made some tests using google.loader.ClientLocation from: http://www.google.com/jsapi But I get null for the test: if (google.loader.ClientLocation) This is the behaviour when google does not find information for IP. I searched StackOverflow and there are a lot of questions regarding it but no good answers. I searched the net and saw these 2 links: https://groups.google.com/forum/?fromgroups=#!topic/google-ajax-search-api/8q_oG-Y9fp8 http://code.google.com/p/google-ajax-apis/issues/detail?id=586 https://groups.google.com/forum/?fromgroups=#!topic/google-ajax-search-api/rzoIh4RrtOQ Which

Latitude and longitude can find zip code?

牧云@^-^@ 提交于 2019-11-27 01:59:57
问题 I am using Google geocoder for lat and lon and my question is, is there a way you can find out zipcode with latitude and longitude? 回答1: I think what you are looking for is the address_components[] in the results array. Maybe something like this would work, just typing the below so it might have errors in it but I think you will get the idea. http://code.google.com/apis/maps/documentation/geocoding/#Results function (request, response) { geocoder.geocode({ 'address': request.term, 'latLng':

How can I set my latitude and longitude for debugging the Geolocation API with Google Chrome?

你说的曾经没有我的故事 提交于 2019-11-27 01:55:16
问题 For my development system I'd like to be able to set the Geolocation (Lat, Long) in Chrome so that when I'm doing the testing the browser thinks I'm at location X when I really might be at location Y. Does anyone know how to force Google Chrome to use a Lat and Long that I provide as the location? 回答1: If you're talking about the Geolocation API, you can override the function: navigator.geolocation.getCurrentPosition = function(success, failure) { success({ coords: { latitude: 30, longitude:

Geolocation HTML5 enableHighAccuracy True , False or Best Option?

Deadly 提交于 2019-11-27 01:55:12
问题 i have a problem about HTML5 geolocation feature. I use the code below to get location data. I use "enableHighAccuracy: false" option to work with Cell Based GPS feature. Accurancy is low but response it too fast. But some people always use Built-in GPS with their mobile phone, so this code does not work for them. Bu if i change accurency option as "enableHighAccuracy: true" it works for them. But this time, the code uses only built-in GPS. not CELL based GPS. The question -> How can i do

What is the real world accuracy of phone accelerometers when used for positioning?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 01:53:01
I am working on an application where I would like to track the position of a mobile user inside a building where GPS is unavailable. The user starts at a well known fixed location (accurate to within 5 centimeters), at which point the accelerometer in the phone is to be activated to track any further movements with respect to that fixed location. My question is, in current generation smart phones (iphones, android phones, etc), how accurately can one expect to be able to track somebodies position based on the accelerometer these phones generally come equip with? Specific examples would be good

Android The import com.google cannot be resolved

眉间皱痕 提交于 2019-11-27 01:51:35
问题 I'm trying to test LocationService example of Android developer as per following link http://developer.android.com/training/location/retrieve-current.html. At that time, error message show me that " The import com.google cannot be resolved " for following 5 lines. I'm really confused how to solve this problem. import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GooglePlayServicesClient; import com.google.android.gms.common.GooglePlayServicesUtil; import

Location detecting techniques for IP addresses

依然范特西╮ 提交于 2019-11-27 01:44:45
What are the location detecting techniques for IP addresses? I know to look at the $_SERVER['HTTP_ACCEPT_LANGUAGE'] (not accurate but mostly useful to detect location, for example if an IP range's users set French to their browser then it means that this range) belongs to France and gethostbyaddr($_SERVER['REMOTE_ADDR']) (to look country code top-level domain) then may be to whois gethostbyaddr($_SERVER['REMOTE_ADDR']) sometimes: $HTTP_USER_AGENT (Firefox's user agent string has language code, not accurate but mostly can be used to detect the location) Also I know how to get the time zone but

Determine the centroid of multiple points

不打扰是莪最后的温柔 提交于 2019-11-27 01:42:21
问题 I'm writing a mapping application that I am writing in python and I need to get the lat/lon centroid of N points. Say I have two locations a.lat = 101 a.lon = 230 b.lat = 146 b.lon = 200 Getting the center of two points is fairly easy using a euclidean formula. I would like to be able to do it for more then two points. Fundamentally I'm looking to do something like http://a.placebetween.us/ where one can enter multiple addresses and find a the spot that is equidistant for everyone. 回答1: Have

Easiest way of getting reverse geocoded current location from iOS

故事扮演 提交于 2019-11-27 01:24:27
问题 I saw from another question here : Determine iPhone user's country that it is possible to get the current country the user of the iPhone is in. And that is quite convenient for many uses. However, would it be possible to go even deeper and infer from iOS (if it has the information) which state or city the user is in as well? I suppose reverse geocoding services would be the next step if things weren't possible.. Are there even such things as a reverse geocoding service you can hire for your