HTML and CSS Reference
In-Depth Information
<meta name "layout" content "webkit" />
<meta content "minimum scale 1.0, width device width, maximum
scale 0.6667, user scalable no" name "viewport" />
<link href "style.css" rel "stylesheet" media "screen" type "text/css" />
<! Einladen/Aufruf der Google Maps API Version 3 >
<script type "text/javascript"
src "http://maps.google.com/maps/api/js?sensor true">
</script>
<script>
(function my() {
var $i {};
$i.vars {};
$i.init function()
{
if ($i.hasGeo)
{
navigator.geolocation.getCurrentPosition($i.showLocation,
$i.handleError, {timeout:30000, maximumAge:300000, enableHighAccuracy:true})
}
else
document.getElementById('message').innerHTML 'Geo Location
API nicht verf&uuml;gbar!';
};
$i.showLocation function(position)
{
document.getElementById('message').innerHTML 'latitude: ' +
position.coords.latitude + ' / longitude: ' + position.coords.longitude + '
/ accuracy: ' + position.coords.accuracy + 'meters (acquired '+new
Date(position.timestamp)+')';
var latlng new google.maps.LatLng(position.coords.latitude,
position.coords.longitude);
vargeocoder new google.maps.Geocoder();
geocoder.geocode({'latLng': latlng}, function(results, status)
{
if (status google.maps.GeocoderStatus.OK) {
if (results[0]) {
$i.showAddress(results[0]) //0 most accurate
}
} else {
alert("Reverse Geocoding nicht möglich : " + status);
}
});
}
Search WWH ::




Custom Search