HTML and CSS Reference
In-Depth Information
<script>
(function my() {
var $i {};
$i.vars {};
$i.vars.callbacks 0;
$i.vars.usedCallbacks 0;
$i.vars.lastUpdate null;
$i.init function()
{
if($i.hasGeo)
{
$i.vars.watchID
navigator.geolocation.watchPosition($i.showLocation, $i.handleError,
{timeout:30000, maximumAge:300000, enableHighAccuracy:true});
document.getElementById('stop').addEventListener('click',
function(event) {
if($i.vars.watchID! null)
{
navigator.geolocation.clearWatch($i.vars.watchID);
alert('Cleared watch with ID:' +$i.vars.watchID);
$i.vars.watchID null;
this.value 'Beobachtenstarten';
}
else
{
$i.vars.watchID
navigator.geolocation.watchPosition($i.showLocation, $i.handleError,
{timeout:30000, maximumAge:300000, enableHighAccuracy:true});
this.value 'Beobachtenstoppen';
}
},true);
}
else
document.getElementById('message').innerHTML 'Geo Location
API nicht verf&uuml;gbar!';
};
$i.showLocation function(position)
{
$i.vars.callbacks++;
document.getElementById('message1').innerHTML
$i.vars.callbacks;
if(!$i.vars.map)
{
var latlng new
google.maps.LatLng(position.coords.latitude, position.coords.longitude);
var myOptions {
Search WWH ::




Custom Search