I've described a problem with geolocation on my smartphone.
Subsequently the source I was using. Please can anyone teach me what
i'm doing wrong?

<!DOCTYPE html>
<html>
<head>
<title>Hello World Geolocation</title>
</head>
<body>
<h1>Gears Geolocation Demo</h1>
<div id="view-source">&nbsp;</div>
<p id="status"></p>

<p><b>This page demonstrates basic usage of the Geolocation API.</b></
p>

<!-- ====================================== -->
<!-- End HTML code.  Begin JavaScript code. -->

<script type="text/javascript" src="gears_init.js"></script>
<script type="text/javascript" src="sample.js"></script>
<script>

init();

function init() {
  if (!window.google || !google.gears) {
    document.getElementById( 'status' ).innerHTML = 'NOT INSTALLED';
    return;
  }

  function successCallback(p) {
    var address = p.gearsAddress.city + ', '
                  + p.gearsAddress.region + ', '
                  + p.gearsAddress.country + ' ('
                  + p.latitude + ', '
                  + p.longitude + ')';

   document.getElementById( 'status' ).innerHTML = 'Your address is: '
+ address;
  }

  function errorCallback(err) {
    var msg = 'Error retrieving your location: ' + err.message;
    document.getElementById( 'status' ).innerHTML = 'ERROR';
  }

  try {
    var geolocation = google.gears.factory.create('beta.geolocation');
    document.getElementById( 'status' ).innerHTML =
google.gears.factory.getBuildInfo();
    geolocation.getCurrentPosition(successCallback,
                                   errorCallback,
                                   { enableHighAccuracy: true,
                                     gearsRequestAddress: true });
  } catch (e) {
    document.getElementById( 'status' ).innerHTML = 'EXCEPTION';
    return;
  }

}
</script>
</body>
</html>

On 21 Okt., 16:11, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> My Hardware:
> HTC Modell-Nr.: HERA100
>
> OS:
> Windows Mobile 6 Prof. - CE OS 5.2.1236
>
> My problem:
> I'm using the sample application »hello_world_geolocation.html« on
> code.google.com - everything works fine!
>
> I copy the html file to my server and adjust it a bit (addStatus()).
> The application works fine on my desktop.
>
> On my mobile nothing happens!
> There is no security request, the page is displayed with no "geo
> result"?
>
> A request of  »google.gears.factory.getBuildInfo() reports »NOT
> INSTALLED«
> I suggest, the demo from code.google.com works fine.
>
> Has anybody an idea what's going wrong?
>
> Thanks
>
> Harry

Reply via email to