Hi,
I am new to Google APIs and as per my requirement I am currently using
Geolocation API. I installed the gears on my device and could
successfully execute the sample application on geolocation api and got
the current address on my device.
Now I am trying to write my own html page which calls the geolocation
API ,but I am stuck here and urgently need help……………
Here is my code:-
<html>
<head>GEOLOCATION API</head>
<body>
<script src="gears_init.js"></script>
<script>
function updatePosition(position) {
alert('Current lat/lon is: ' + position.latitude + ',' +
position.longitude);
}
function handleError(positionError) {
alert('Attempt to get location failed: ' + positionError.message);
}
var geo = google.gears.factory.create('beta.geolocation');
alert('Hi2');
//
is not displayed
geo.getCurrentPosition(updatePosition, handleError);
</script>
</body>
</html>
As mentioned I have included the gears_init.js file but still I think
the statement
var geo = google.gears.factory.create('beta.geolocation');
is not being executed.What may be the issue? Kindly do instruct me as
soon as possible.
Any pointers to this would be of great help to me.