|
| ||||||||||
| Tags: detection, geolocation |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Geolocation detection
|
|
#2
| |||
| |||
| Re: Geolocation detection
You will need an ip address for searching the location of any user, anyhow, check out an alternative structure for the functions that uses IP geolocation of google for fallback: Code: if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(updatePosition, ipPosition, { options... });
} else {
ipPosition();
}
function ipPosition() {
updatePosition(google.loader.ClientLocation);
}
function updatePosition(position) {
if (position == null) {
return updatePosition(defaultPlace());
}
// Firefox 3.6 passes in a non-standard position object with lat/lng at the top level instead of in .coords
var coords = (position.hasOwnProperty("coords")) ? position.coords : position;
if (coords == null) {
return updatePosition(defaultPlace());
}
[...]
} |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Geolocation detection" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| GeoLocation is not working with Safari 5 and HTML 5 | Super-Man | Technology & Internet | 3 | 15-01-2012 08:01 PM |
| GeoLocation is not working properly ASUS Eee PC T101MT | Anantram | Portable Devices | 4 | 08-07-2011 08:02 AM |
| Firefox 3.5 include Geolocation | Johnny | Technology & Internet | 2 | 10-06-2009 11:13 PM |
| Opera browser with Geolocation API support | Kraker999 | Web News & Trends | 3 | 30-03-2009 02:13 PM |
| Snow Leopard: multitouch management and geolocation | prakashseth | Web News & Trends | 4 | 09-02-2009 07:24 AM |