geolocation

Retry Geolocation request without refreshing the browser

左心房为你撑大大i 提交于 2019-12-11 06:56:44
问题 I have a specific issue with the Geolocation api. This is my scenario: User landed on a page ( in Chrome - Android ) with GPS location disabled. There is a button on the page, and onClick of the button triggers the Geolocation.getCurrentPosition Geolocation goes to the error callback with error message “User denied Geolocation” User goes to Android settings ( mostly in notification drawer ) and turn on the location User click the button again ( at this time, location is available ) to get the

Mongodb not $near

六眼飞鱼酱① 提交于 2019-12-11 06:39:23
问题 Let's say I have a collection in mongoDB with geoLocation indexed field (coordinates). I know I can query records nearby my location with something like MySchema.find({coordinates: {$near: [100,100], $maxDistance: 500}, callback); But what if I want to get those records away from my location (out of the circle around location)?? Is it possible? I have tried to use $not , but it returned empty results, but I know there are hundreds of records not near me. I know there is this option to get

Getting zip-code + 4 from latitude/longitude

邮差的信 提交于 2019-12-11 06:35:55
问题 Does anyone know the best way to use the iPhone location services (lat/long) to determine the zip code+4 of the user? Does MKReverseGeocoder have the ability to pull back zip+4? Thanks! -tony 回答1: My favorite place to go for anything having to do with geocoding is geonames.org. 回答2: You may be able to use a free Reverse Geocoding service to do this for you. Google has such a service: http://code.google.com/apis/maps/documentation/services.html#ReverseGeocoding Alternately, this Google Groups

Administrative relations of a place with openstreetmap

和自甴很熟 提交于 2019-12-11 06:21:41
问题 I did a lot of research about how to use overpass-api tried a lot of things on http://overpass-turbo.eu/ but i can't find the way to get the result i'm expecting ... I would like with a query, to find all the relations a place has but only administrative relations (department of the place, region of the place, country) everyhting that is assimilated to an "AdministrativeArea" Tried this with both nominatim and the overpass_api If any of you guys have an idea Thanks ! 回答1: Just use the

Plot georeferenced raster images in Plotly (R API)

冷暖自知 提交于 2019-12-11 06:13:14
问题 I would like to use Plotly in R to create 3D modells of trenches of archaeological excavations. I'm quite successful to plot point and surface data (Example: Vignette of the R package I'm working on), but I would also like to add raster information of the georeferenced profile pictures of the trenches. I didn't find any way to plot raster data in Plotlys 3D environment. The only solution I came up with so far (thanks to this post) was to create a 3D modell of the profile with SFM using

Gecko for windows forms and geolocation. How to accept request for share my location?

耗尽温柔 提交于 2019-12-11 06:06:10
问题 My main purpose is get my current geolocation. I've tried to do it with standart control "WebBrowser" but geolocation is not supported by it. So now I'm trying to implement Gecko wrapper https://code.google.com/p/geckofx/ and xulrunner-3.6.28.en-US.win32.sdk (or xulrunner-1.9.2.19.en-US.win32) to windows forms. It perfectly navigate to any url in windows forms. But I've problems to get current geolocation in it. It doesn't give me a window to accept "share my location" as any other browser

Enter zipcode and display users within a certain radius

青春壹個敷衍的年華 提交于 2019-12-11 05:59:55
问题 I have a Meteor app where product providers enter their zip code when registering. This data is stored in users.profile.zipcode. Flow: 1. Anyone visiting the site can enter a zip code in a search field. 2. A list of product providers with zipcodes within 10 kilometers of that zip code is displayed. The app will be for Norwegian users to begin with, but will maybe be expanded to different countries in the future. Can someone provide me with example code of how this can be done, i guess using

Android 4.1 Geocoder.getLocationFromName() throws IOException: Unable to parse response from server ONLY over 3G

ε祈祈猫儿з 提交于 2019-12-11 05:52:36
问题 I am using the Geocoder in my android app to resolve a string in to Addresses. The following snippet of code works normally over Wifi, but not over 3G. When over 3G, it throws an IOException: Unable to parse response from server . In other discussions about this, a common answer is that a probable cause is that the Geocoder is used many times/minute, surpassing the threshold, and that causes the service to temporarily throw the exception. The I am sure this is not my case, because I never got

Android: using requestSingleUpdate or replace it

与世无争的帅哥 提交于 2019-12-11 05:34:45
问题 i'm working on app, which must get latitude and longitude. in my case requestLocationUpdates (String provider, long minTime, float minDistance, LocationListener listener) is not in option. why? because i must get location just when user do something that location is needed (let's say he hits button). and i need location exactly on the time, when button is hit. in requestLocationUpdates , we can set minTime-if i set this let's say on 30000 the location at the "button hit time" won't be as good

how to get current location in textbox using geolocation?

拈花ヽ惹草 提交于 2019-12-11 05:18:45
问题 My map only enters address in textbox when I drag the marker. but I want the current tracked position to be displayed in textbox as soon as the page load happens. I am unable to do so. here is my code code: var geocoder; function initMap() { geocoder = new google.maps.Geocoder(); if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition, showError); } else { x = document.getElementById("ContentPlaceHolder1_txtLoc"); x.innerHTML = "Geolocation is not supported by this