Hi Austin,
thank you for the fast answer! But the problem is, that I don't know
how to get the Geolocation JSON Request Objects in my JavaScript
Code. Means, that I don't know how to access the JSON Objects. Wehn
you have an idea how I can integrate your idea in my sample code, let
me know.
Sample Code:
<html>
<head>
<title>Gears Demo</title>
</head>
<body>
<h1> Gears Demo </h1>
<script src="gears_init.js"></script>
<script type="text/javascript">
var geo = google.gears.factory.create('beta.geolocation');
function updatePosition(position) {
alert('Current lat/lon is: ' + position.latitude + ',' +
position.longitude + ', ' + position.gearsAddress.street);
}
function handleError(positionError) {
alert('Attempt to get location failed: ' + positionError.message);
}
try {
geo.getCurrentPosition(updatePosition, handleError,
{ enableHighAccuracy: true,
gearsRequestAddress: true});
} catch (e) {
alert('Error using Geolocation API: ' + e.message);
}
</script>
</body>
</html>
My second question is still important to me: How do I start to
implement my own location provider for Gears Geolocation?
Thanks!