Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
68
rated 0 times [  74] [ 6]  / answers: 1 / hits: 27428  / 15 Years ago, fri, august 28, 2009, 12:00:00

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:




  1. support this feature out of the box, or

  2. support this feature with an upgrade, or

  3. support geolocation with equivalent fidelity of data with some other snippet of Javascript.



I'm only familiar with my own device, so this is my list so far:



Out of the box:




  1. iPhone 3GS



Supported, but only with an update




  1. iPhone 3G

  2. iPhone 2G (?)

  3. PC or Mac computer with Firefox 3.5



Supported with some other snippet



?



What is the level of support in Blackberry, Android phones, etc?


More From » geolocation

 Answers
35

Although I think it's a great practice to standardize on the (draft, by the way) W3C Geolocation API, it's worth noting that there are a few other options in the browser, which can be particularly helpful if you need to target an older platform.




  • Firefox 3.1 had support for Geode, which uses calls to navigator.geolocation with very similar syntax.

  • Loki is a plug-in built by Skyhook which works on Internet Explorer 6, Internet Explorer 7, Firefox 2, Firefox 3, Safari and Opera. The syntax is substantially different, but still easy.

  • Google Gears provides a geolocation API with a syntax fairly similar to the W3C API syntax. You can install Google Gears on Internet Explorer 6+, Firefox 1.5+, Safari, Opera Mobile and IE Mobile.


[#98805] Wednesday, August 26, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
savanar

Total Points: 237
Total Questions: 105
Total Answers: 99

Location: Wales
Member since Mon, May 17, 2021
3 Years ago
;