geolocation

Geolocation without Prompt

旧街凉风 提交于 2019-12-09 17:48:42
问题 I know about the HTML5 way to do geolocation, but the caveat is that it has to prompt the user for permission. navigator.geolocation.getCurrentPosition It gets particularly annoying when I would like to do geolocation right at the home page to serve customized content based on location: no one likes to get a prompt every time he or she visits your site. The idea is to use external services to do geolocation based on IP address or something similar to get a less accurate estimate of the user's

Geo Coding Address - get district of a certain address (Google API)

≡放荡痞女 提交于 2019-12-09 17:33:05
问题 I have a database with exact addresses (street, no, city, region/area, country). However, I was wondering if there was a way to use Google API to get the district of a city (e.g. "Manhattan") if we are in New York? All the other information I have already in the database, so I would just need the district if there is one (of course this will be only in larger cities)... UPDATE: I found this function on http://www.techques.com/question/1-3151450/Google-geolocation-API---Use-longitude-and

How can I get google maps location names?

偶尔善良 提交于 2019-12-09 17:29:59
问题 I'm building a site in which it is required to get all google maps locations, from countries names to the smallest village. Is this anywhere in the api? Because it is nowhere to be found. 回答1: You need to parse the response to get that data out, so for example if you want to get the country and results is the result object you get by calling the reverse Gecoding: https://developers.google.com/maps/documentation/javascript/geocoding#ReverseGeocoding Then the function for getting the country

What is the maximum and minimum radius that can be set for regions in iOS geofencing

旧巷老猫 提交于 2019-12-09 14:32:48
问题 I was working on geofencing in iOS. I actually want to set different regions on the map with different radius for each regions. I actually want to know the Min and Max radius for Regions in iOS geofencing. Thanks, 回答1: In iOS there is no minimum radius specified. Apple says, "The specific threshold distances are determined by the hardware and the location technologies that are currently available. For example, if Wi-Fi is disabled, region monitoring is significantly less accurate. However,

SQL Query For Total Points Within Radius of a Location

大城市里の小女人 提交于 2019-12-09 14:03:59
问题 I have a database table of all zipcodes in the US that includes city,state,latitude & longitude for each zipcode. I also have a database table of points that each have a latitude & longitude associated with them. I'd like to be able to use 1 MySQL query to provide me with a list of all unique city/state combinations from the zipcodes table with the total number of points within a given radius of that city/state. I can get the unique city/state list using the following query: select city,state

Phonegap Geolocation: track position if app closed

僤鯓⒐⒋嵵緔 提交于 2019-12-09 13:47:59
问题 i've followed the tutorial on mobile.tutsplus All runs. But: If I closed the app or turn on the device lock the tracking stops. I want to make my personal jogging tracker with some additional features so i want that the tracking goes on. I'm afraid that is only possible with a pure native App in Objective-C. Any Ideas? 回答1: Not sure about running it in background... but I ran through the same tutorial and had to turn off the sleep mode to get it to work. I am still having problems getting

Offline maps on IPhone

五迷三道 提交于 2019-12-09 13:46:26
问题 I'm looking for offline maps for IPhone. For now I've discovered Route-me and CloudMade. CloudMade doesn't have build in functionality for offline maps. There is an option to setup CloudMade to work offline but other question how to get a map you need. Route-me works with MbTiles format. There is option to download osm file(From OpenStreetmap) and convert it to MbTiles file. My questions: Are there sdk for IPhone that support offline maps? And how to get maps suitable for this sdk? 回答1:

Android Location return null after Enabling GPS in dialog

痴心易碎 提交于 2019-12-09 12:11:39
问题 When I enter a screen, I check for if GPS is turned on, if not, the dialog to enable GPS is shown. When user clicks Yes, onActivityResult -> GPS is turned on and I try to get the location but this always returns null When I enter the screen with GPS already on, location is retrieved properly. I have been struggling with this for few days now and can't seem to find any resources. UserLocationUtilities.java public class UserLocationUtilities implements GoogleApiClient.ConnectionCallbacks,

How do I get location name or city using latitude & longitudes?

a 夏天 提交于 2019-12-09 09:08:56
问题 I'm using the below code, but how to get the city name or the location name from the longitude & latitude? var x=document.getElementById("location"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition,showError); } else { x.innerHTML="Geolocation is not supported by this browser."; } } function showPosition(position) { x.innerHTML="Latitude: " + position.coords.latitude + "<br>Longitude: " + position.coords.longitude; } 回答1: You can use

Best IP to Location for Ruby on Rails

爱⌒轻易说出口 提交于 2019-12-09 08:35:23
问题 I was wondering if anyone had any experience with a good plugin/gem that pulls city and state from the IP. I've tried the one built into GeoKit but it's terrible. I don't mind paying for it as well but I would prefer free. 回答1: One of the best IP to location products is MaxMind's GeoIP. The MaxMind GeoIP City does cost (http://www.maxmind.com/app/city), but there is also the MaxMind GeoLite City (http://www.maxmind.com/app/geolitecity) which is free, but a bit less accurate and not as