I updated yesterday my iPod Touch firmware and for my surprise my iPod
stopped recognizing the navigator.geolocation object. Before that
geolocation worked correctly. It still works on the iPhone simulator
without any errors. Any ideas what can be the reason of that?
thanks, bee
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
var pressMe;
function init(){
pressMe=document.getElementById("link");
if(navigator.geolocation){
navigator.geolocation.getCurrentPosition(showMap, handleError,
{maximumAge:300000});}
else{
alert("The Geolocation is not supported" );
}
}
// Get the current location
function showMap(position){
var lat= position.coords.latitude;
var long= position.coords.longitude;//pressMe.innerHTML="http://
maps.google.com/maps?q="+lat +","+long;
pressMe.href="http://maps.google.com/maps?saddr=120.20,
200,20&daddr="+lat +","+long;
}
function handleError(error){
alert(error.message);
}
</script>
</head>
<body onload="init()">
<div>
<a href="#" target="_self" id="link"> Show where I am at </a>
</div>
</body>
</html>
--
You received this message because you are subscribed to the Google Groups
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/iphonewebdev?hl=.