1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="jplayer.blue.monday.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>shoudio verbindig test</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map_canvas { height: 100% }
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDFUbv6XEO15bVG9gMmwaCgwugVKBwnDes&sensor=true"></script>
<script type="text/javascript" src="http://localhost/wordpress/jPlayer/jquery.jplayer.min.js"></script>
<SCRIPT TYPE="text/javascript">
var input = 'henk';
$.ajax({
url: 'http://localhost/wordpress/shoudio.php',
type: 'GET',
dataType: 'json',
success: function(data) {
input = data.shoudios;
/*
$.each(data.shoudios, function(i,shoudio){
alert(shoudio.id);
});*/
alles()
},
error: function() { alert('boo!'); },
});
function alles(){
//Variable declareren.
var image = 'http://localhost/wordpress/testlogosmallblack.png';
$.each(input, function(i, shoudio){
window['contentString'+i] = '<div id="content"><div id="siteNotice">'+ shoudio.created_at +'</div><h2 id="firstHeading">'+ shoudio.message +'</h2><div id="bodyContent">'+shoudio.username+'</div></div><div id="extrainfo'+shoudio.id+'"><div id="jquery_jplayer_1" class="jp-jplayer"></div><div id="jp_container_1" class="jp-audio"><div class="jp-type-single"><div class="jp-gui jp-interface"><ul class="jp-controls"><li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li><li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li><li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li><li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li><li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li><li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="max volume">max volume</a></li></ul><div class="jp-progress"><div class="jp-seek-bar"><div class="jp-play-bar"></div></div></div><div class="jp-volume-bar"><div class="jp-volume-bar-value"></div></div><div class="jp-current-time"></div><div class="jp-duration"></div></div></div></div></div><div class="fb-like" data-href="http://www.mytotem.nl/" data-send="true" data-width="450" data-show-faces="false" data-font="lucida grande"></div>';
window['infowindow'+i] = new google.maps.InfoWindow({
content: window['contentString'+i]
});
window['markerpoint'+i] = new google.maps.LatLng(shoudio.lat, shoudio.lon);
});
//Marker toevoegen
function addMarker(positieMarker,infowindow) {
var marker = new google.maps.Marker({
position: positieMarker,
map: map,
icon:image
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker);
});
}
initialize();
//Alles initializeren
function initialize() {
var mapOptions = {
zoom: 8,
mapTypeId: google.maps.MapTypeId.ROADMAP,
center:new google.maps.LatLng(52.1750, 4.7916)
};
map = new google.maps.Map(document.getElementById("map_canvas"),
mapOptions);
$.each(input, function(i, shoudio){
addMarker(window['markerpoint'+i],window['infowindow'+i]);
});
}
}
</SCRIPT>
<script type="javascript/text">
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/nl_NL/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div id ="jp-jplayer"></div>
<script>
$(document).ready(function(){
$("#jquery_jplayer_1").jPlayer({
ready: function (event) {
$(this).jPlayer("setMedia", {
mp3:"audio.mp3"
});
},
swfPath: "../js",
wmode: "window"
});
});
</script>
</head>
<body >
<div id="map_canvas" style="width:100%; height:100%"></div>
</body>
</html> |