geolocation

Get current position in Google Maps JavaScript API v3 and get the dot to follow me without user interaction

青春壹個敷衍的年華 提交于 2019-12-09 07:51:53
问题 I am assuming this is not possible or advisable due to the nature of the web but I will ask anyway. I know I can get a user's current location and centre on a map using the Google Maps JavaScript API v3. I can even get it to show a dot for where the user is currently located. What I really want to know, and my client is asking for this, is can I get the dot to follow the user around without user interaction (ie.. the user does not interact with the device, the dot just moves when the user

Identifying the country of visitor to my website

我的未来我决定 提交于 2019-12-09 06:57:11
问题 I want to identify the country my visitors come from using php. How can I do this? 回答1: You need to use the PHP GeoIP extension that allows you to locate various information about the users via IP. http://us.php.net/geoip or you can use Maxmind's API to access the data aswell. http://www.maxmind.com/app/php 回答2: You need to use a Geolocation service/database. Check out the Maxmind API. 回答3: I recommend you taking a look at the MaxMind's GeoIP API: http://www.maxmind.com/app/php 回答4: I realise

Google Geocoding API returns wrong language in response

余生颓废 提交于 2019-12-09 06:32:10
问题 My project requests Geocoding API for coordinates and correct full addresses in Odessa, Ukraine. I could request response in Russian or Ukrainian language adding language=ru ( language=uk ) parameter to the HTTP request. Starting today I get street name in Ukrainian in response, no matter which language I specify in request. Examples. Request for Russian: https://maps.googleapis.com/maps/api/geocode/json?address=Пушкинская, Одесса, Украина&language=ru Relevant part of the response: "results"

how to change the location mode to “high accuracy/battery saving” form it default mode(device only)

隐身守侯 提交于 2019-12-09 06:29:10
问题 I'm trying to implement a google map for getting current location using this tutorial android google map tutorial The problem is ,It is not getting my current location untill I have started my device's google map and grant permission to access google location services. After this my application also get my current location. And it's working fine untill location is on in the device. And when location is turned off it's again need to started device's google map and grant permission for google

R ggplot2/ggmap concentric circles as points

房东的猫 提交于 2019-12-09 06:15:32
问题 I am trying to plot some information that shows full population and then a subset of that population by location on a map. I've seen data visualizations that use concentric circles or 3-d inverted cones to convey this. I just can't figure out how to do it in ggplot / ggmap Here's a free hand version in Paint that shows a rough idea of what I'm looking to do: Here's a rough piece of data for an example: > dput(df1) structure(list(zip = c("00210", "00653", "00952", "02571", "04211", "05286",

What services exist that geo-locates a person based on IP? [closed]

假装没事ソ 提交于 2019-12-09 05:54:57
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . What do people use to geo-locate a persons IP to determine the city they are in? I've tried the built in functionality of Google API but its geo-location database seem spotty. http://code.google.com/apis/ajax/documentation/#ClientLocation Anyone use any other service for geo-locating with success? 回答1: The most

What does map.setMyLocationEnabled(true) really do

半世苍凉 提交于 2019-12-09 05:06:07
问题 I am setting: map.setMyLocationEnabled(true) But I am wondering what this really does. What I know: I get a locate me button in the upper right corner of the map I get a blue icon on the map that represents my current location Here is my concern. I am writing a location aware app but I am concerned about battery. Elsewhere in my app (via preferences) I set up a LocationManager and listen for location events so I can log them. But part of my preferences is the accuracy at which I get updates

How long ago was the last known location recorded?

两盒软妹~` 提交于 2019-12-09 02:33:04
问题 I am getting my last known location but not how long it has been since my location was last updated. How can I find out how long it has been since the location was last updated? LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE); Criteria c = new Criteria(); c.setAccuracy(Criteria.ACCURACY_FINE); c.setAccuracy(Criteria.ACCURACY_COARSE); c.setAltitudeRequired(false); c.setBearingRequired(false); c.setCostAllowed(true); c.setPowerRequirement(Criteria.POWER

Geolocation error with IP address 127.0.0.1

北城余情 提交于 2019-12-09 02:17:15
问题 OK, so I tried implementing this, http://ipaddressextensions.codeplex.com/. It is displaying the output as:- 127.0.0.1 RESERVED ZZ What on earth is this "RESERVED" and "ZZ"? It should be displayed as "INDIA IN". The IP address is of the local host. All right, but what about the country name and country code? Why won't they display correctly? What do I need to change in my code? 回答1: When you are testing from home, both server and user are one (your PC). So you can't expect it to show the

How to fake return calls from the geolocator in jasmine

戏子无情 提交于 2019-12-08 23:42:19
问题 I have a function that calls the geolocator and i don't know how to test this function. I've tried spying on the geolocator and returning fake data but with no success, the original function is still used and so i would have to wait and i couldn't use mock data. // this doesn't work var navigator_spy = spyOn( navigator.geolocation, 'getCurrentPosition' ).andReturn( { coords : { latitude : 63, longitude : 143 } } ); How can I do this? 回答1: When you call the geolocation code, it looks like this