navigator.geolocation.getCurrentPosition returns the approx lat/long information if I connect to the internet via Wireless. However the method call fails when connected via Network cable. Is this by design or am I missing something? Below is the sample html page and I am using Chrome 5 to test it.
<!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>
<title>Geocode Test</title>
<script type="text/javascript">
function getGeoLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function (position) {
alert(position);
},
function () {
alert("oops");
});
}
}
</script>
</head>
<body>
<h1>Get Current Location</h1>
<button id='btnGetLocation' onclick='getGeoLocation()'>Get Current Location</button>
</body>
</html>
TIA