geolocation

Calculate the geo position at given time

不羁岁月 提交于 2019-11-26 22:24:41
问题 With Google API directions I can get all the information to go from one place to another and I can get all the steps as well. But I don't know if there is a way to retrieve/calculate the position(Lat/Lng) after a given time. Assuming, to simplify, my speed is constant is there I way to answer the question: where will I be in X minutes ? NOTE I know that Distance travelled = Time * Speed but in this way I know how many KM I travelled. What I want to know is the (Lat/Lng) after a period of time

How to get the formatted address from a dragged marker in Google Version Maps

守給你的承諾、 提交于 2019-11-26 22:23:39
I have made a Google map that lets you input an address into a text field. It then navigates you to the address that you entered into the text field and leaves a draggable marker that when dragged shows you the Lat and Long and The Geolocated Address. I instead of displaying the above address, would like when you drag the marker to display in the bottom corner the Address of the Marker and the not the inputted address from the text field. I have tried a number of methods to no avail. lonlat[0].formatted_address was amongst some of the things i tried. I got my reference from Google My code is

Django, Retrieve IP location

帅比萌擦擦* 提交于 2019-11-26 22:19:39
问题 I would like to redirect my users to specific location areas in my website, by detecting their location from their IP address. What would be the best way to achieve this under Django 1.1.1 ? Thanks Edit: I want city based locationing on europe. 回答1: GeoDjango looks like it will suit your needs. I'm not sure exactly how you would want to direct users, but using the GeoIP API, you can do something like: from django.contrib.gis.utils import GeoIP g = GeoIP() ip = request.META.get('REMOTE_ADDR',

Which Devices Support Javascript Geolocation via navigator.geolocation?

风流意气都作罢 提交于 2019-11-26 22:13:32
问题 The iPhone supports geolocation in mobile Safari via the following call: navigator.geolocation.getCurrentPosition( function(pos){ var lat = pos.coords.latitude; var long = pos.coords.longitude; }, function(){ /* Handler if location could not be found */ } ); I'd like to build a good list of devices that have one of the following: support this feature out of the box , or support this feature with an upgrade, or support geolocation with equivalent fidelity of data with some other snippet of

How to detect country / location of visitor? [duplicate]

一笑奈何 提交于 2019-11-26 22:06:13
Possible Duplicate: Location detecting techniques for IP addresses For our website it's important to know from exactly which country our visitor is coming from. I guess the best answer for my question would be the simple geo location feature of current browser systems, which just ask the user if the website is allowed to see his geographic location: http://dev.w3.org/geo/api/spec-source.html but I don't want to bother visitor with questions, I would love to automatically detects the visitor's location (country should be enough.) What's the best way to do this? - what ip database would be the

Calculate total miles traveled from vectors of lat / lon

柔情痞子 提交于 2019-11-26 22:05:57
问题 I have a data frame with data about a driver and the route they followed. I'm trying to figure out the total mileage traveled. I'm using the geosphere package but can't figure out the correct way to apply it and get an answer in miles. > head(df1) id routeDateTime driverId lat lon 1 1 2012-11-12 02:08:41 123 76.57169 -110.8070 2 2 2012-11-12 02:09:41 123 76.44325 -110.7525 3 3 2012-11-12 02:10:41 123 76.90897 -110.8613 4 4 2012-11-12 03:18:41 123 76.11152 -110.2037 5 5 2012-11-12 03:19:41 123

Forward geocoding from the iPhone

戏子无情 提交于 2019-11-26 21:52:00
Given that the mapkit doesn't provide forward geocoding functionality today, can anyone provide help on how I can i use a search bar to return a latitude and longitude coordinate from a user inputted address today. If someone can provide sample code that would be great. iOS 5 now allows for forward Geocoding: http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/LocationAwarenessPG/UsingGeocoders/UsingGeocoders.html#//apple_ref/doc/uid/TP40009497-CH4-SW5 I hope this helps! Merrimack I've created a forward geocoding API for Google's geocoding server. Check out my

About Geolocation in HTML 5

僤鯓⒐⒋嵵緔 提交于 2019-11-26 21:51:31
Google Maps can now pinpoint my location with street precision with the help of Firefox. I understand this is a new feature of HTML 5 compatible browsers and that the location is fetched by using some sort of feature of the connected WiFi network (I hope I'm not making any silly assumptions). What I intend to know is how this whole process exactly works: Why only in HTML 5? Why / how does Firefox ask me to share my location with Google Maps? What is the normal precision one can count on? How can I implement this feature in my websites? Thanks in advance! How does it work? When you visit a

Does GPS require Internet?

青春壹個敷衍的年華 提交于 2019-11-26 21:50:52
Is it necessary to turn both Internet and GPS on before I can read my current location(country, city, locality etc) in my app? If they are, then any alternative way to get the location only from GPS? since the internet availability is an issue. As others have said, you do not need internet for GPS. GPS is basically a satellite based positioning system that is designed to calculate geographic coordinates based on timing information received from multiple satellites in the GPS constellation. GPS has a relatively slow time to first fix (TTFF), and from a cold start (meaning without a last known

Reverse geocoding to return results only in English?

谁都会走 提交于 2019-11-26 21:50:18
问题 Using the code below I'm requesting a reverse geocoding for the current coordinate. Everything works great, except for when the device is set to a different language than English. Example: If the language of the device is Italian, and I'm in Italy, the result for country is "Italia" instead of "Italy". How can I force the results to be only in English, regardless of the language of the device? CLGeocoder *geoCoder = [[CLGeocoder alloc] init]; [geoCoder reverseGeocodeLocation:myCurrentLocation