geolocation

Get between streets in Google Maps

折月煮酒 提交于 2019-12-19 10:50:21
问题 I have a coordinate and I need to get the streets name that are between this point. For example, I get the point "Manuela Pedraza 3050" (or geolocation, doesn't matter) and I need to retrieve the values "Zapiola" and "Conesa". Is this possible? 回答1: Concept: create a circle of 8 (as an arbitrary number) of points at 100 meters from your point of interest. get directions from your point of interest to each of those points (you will probably need to use walking directions in that area as the

Location manager doesnt remove location updates! [duplicate]

那年仲夏 提交于 2019-12-19 10:32:28
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: Android: how to cancel a request of Location update with intent? I am trying to disable a pending intent(broadcast) which I have previously created in a different activity but I can't get it to work. I've read that I should recreate the intent(with the same extras and everything), pass it as a parameter so that I can instantiate the pendingIntent and then pass the pendingIntent as a parameter to the location

Firefox's geo.wifi.url's https://www.google.com/loc/json not used?

谁说我不能喝 提交于 2019-12-19 10:19:59
问题 I used a network sniffer and examined all the requests going out from Firefox when going to http://html5demos.com/geo. According to my Firefox, the geolocation service according to geo.wifi.uri entry is https://www.google.com/loc/json. However I don't see this url in any of the requests. What am I missing? 回答1: I see it in LiveHTTPHeaders: https://www.google.com/loc/json POST /loc/json HTTP/1.1 Host: www.google.com User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0b12pre) Gecko/20110220 Firefox

Firefox's geo.wifi.url's https://www.google.com/loc/json not used?

核能气质少年 提交于 2019-12-19 10:19:41
问题 I used a network sniffer and examined all the requests going out from Firefox when going to http://html5demos.com/geo. According to my Firefox, the geolocation service according to geo.wifi.uri entry is https://www.google.com/loc/json. However I don't see this url in any of the requests. What am I missing? 回答1: I see it in LiveHTTPHeaders: https://www.google.com/loc/json POST /loc/json HTTP/1.1 Host: www.google.com User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0b12pre) Gecko/20110220 Firefox

Ionic 4 native plugin geolocation gives me “Module not found: Error: Can't resolve 'rxjs/Observable'”

岁酱吖の 提交于 2019-12-19 07:54:09
问题 I'm trying to use ionic native plugin geolocation in ionic 4 but I got a this error: Failed to compile. ./node_modules/@ionic-native/geolocation/index.js Module not found: Error: Can't resolve 'rxjs/Observable' in 'C:\Projects\ionic\prayers\node_modules\@ionic-native\geolocation' this is my dependencies: "dependencies": { "@angular/common": "6.0.9", "@angular/core": "6.0.9", "@angular/forms": "6.0.9", "@angular/http": "6.0.9", "@angular/platform-browser": "6.0.9", "@angular/platform-browser

How to detect negative user response for geolocation

淺唱寂寞╮ 提交于 2019-12-19 05:17:39
问题 When using geolocation API's navigator.geolocation.getCurrentPosition() how to deal with a negative response? It says that the second callback function is called when there is an error. However when user chooses not to reveal his location by cancelling the request that function is never fired. It seems that getCurrentPosition() waits for an answer indefinitely. (at least in Firefox 4) How can I know when user presses cancel (or no etc.) Any ideas? 回答1: See edit below You are correct, the

Safari Localhost Permission Blocked

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-19 05:04:05
问题 So ran into this issue today, where I have a website that needs the geolocation of the user. It was working fine when running locally on localhost, but now I get an error saying "Access to geolocation was blocked over insecure connection to http://localhost:4200". WTF Apple? I also tried 127.0.0.1 but got the same result. Am I missing something in the dev settings or did Apple just break everything? Safari Version: 9.1.3 (11601.7.8) 回答1: Maybe it's possible to use https ( How to get angular

iOS 6 AutoPause doesn't work

我与影子孤独终老i 提交于 2019-12-19 04:19:08
问题 I've follow the example of AutoPause from " Session 303 - Staying on track from Location Services " WWDC 2012 In the example you can see how AutoPause is enabled and there two methods which are called: -(void) locationManagerDidPauseLocationUpdates:(CLLocationManager *)manager -(void) locationManagerDidResumeLocationUpdates:(CLLocationManager *)manager I've done the same example but these methods aren't never called. Who have tried the same? 回答1: I'm experimenting with that right now and here

Realtime locating of the android device from another device

人盡茶涼 提交于 2019-12-19 04:01:37
问题 I have an app where i wanted to locate the exact location of the device. Like if you take taxi, i wanted to locate where exactly the taxi. Taxi driver will be using android device. So from that device i wanted to locate the cab location for other users who wants to see where the cab is. I have tried uploading current location of cab driver to server as cab moves for few meters by using requestLocationUpdates(String provider, long minTime, float minDistance, LocationListener listener) and I

postgres spatial indexing

梦想与她 提交于 2019-12-19 03:59:00
问题 I can't seem to find much documentation on this. What's the simplest way to create a database/table on postgres supporting a query like this SELECT * FROM table WHERE distance(POINT(0,0), table.location) <= 1000m; Where POINT(0,0) and table.location should be latitude/longitude pair, and 1000m is 1000 meters. And how should I go about indexing that table? Thanks. 回答1: PostgreSQL support indexes on expressions and also partial indexes, you can probably mix them. This is just a random guess, I