HTML and CSS Reference
In-Depth Information
Hier ist jetzt der gesamte Code des Beispiels. Bitte beachten Sie, dass Sie für den Flickr-
API-Schlüssel einen eigenen Schlüssel in der Variablen apiKey spezifizieren müssen.
Wie das geht, sehen Sie weiter oben. Andernfalls wird das Beispiel nicht funktionieren,
und Sie bekommen keine Bilder.
<! Flickr / Geo Positionsbeispiel
Markus Spiering / Ross Harmes / Sven Haiges
>
<!DOCTYPE html>
<html>
<head>
<title>Flickr Fotos</title>
<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"
/>
<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 'Geolocation
API nicht verfü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);
var myOptions {
zoom: 13,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
Search WWH ::




Custom Search