HTML and CSS Reference
In-Depth Information
};
$i.map new google.maps.Map(document.getElementById("map"),
myOptions);
// Fotos im Umkreis von einem Kilometer holen
var apiKey 'Flickr API Schl├╝ssel';
varrequestURL
'http://api.flickr.com/services/rest/?method flickr.photos.search&api key '
+ apiKey + '&media photos&lat ' + position.coords.latitude + '&lon ' +
position.coords.longitude +
'&radius 2&extras geo%2Curl sq&format json&jsoncallback apiCallback&per page
20';
var scriptElement document.createElement('script');
scriptElement.src requestURL;
document.body.appendChild(scriptElement);
}
window.apiCallback function(rsp) {
var photos rsp.photos.photo;
if(!document.getElementById('photo container')){
var photoContainer document.createElement('div');
photoContainer.id 'photo container';
document.getElementById('message').appendChild(photoContainer);
}
else{
var photoContainer document.getElementById('photo
container');
photoContainer.innerHTML '';
}
varimgElement;
for (var i 0, len photos.length; i < len; i++) {
if(photos[i].url sq){
// Thumbnail Bild dem Container hinzuf├╝gen
imgElement document.createElement('img');
imgElement.src photos[i].url sq
imgElement.hspace 5
imgElement.vspace 5
imgElement.alt photos[i].title;
photoContainer.appendChild(imgElement);
// Markierung auf die Karte setzen
newgoogle.maps.Marker({
position:newgoogle.maps.LatLng(photos[i].latitude,
photos[i].longitude),
map:$i.map,
title:photos[i].title
Search WWH ::




Custom Search