@@ -38,6 +38,33 @@ var Codeweek = window.Codeweek || {};
38
38
content : "loading..."
39
39
} ) ;
40
40
41
+ overlapSpiderifier . addListener ( 'click' , function ( marker ) {
42
+ placeinfowindow . close ( ) ;
43
+
44
+ var infoWindowContent = '' ,
45
+ buble_content = '' ,
46
+ image = '' ,
47
+ description = '' ;
48
+
49
+ if ( marker . image !== "" ) {
50
+ image += '<img src="' + Codeweek . Index . media_url + marker . image + '" class="img-polaroid marker-buble-img">' ;
51
+ }
52
+
53
+ if ( marker . description . length > 150 ) {
54
+ description = marker . description . substring ( 0 , 150 ) + '... ' ;
55
+ } else {
56
+ description = marker . description ;
57
+ }
58
+
59
+ buble_content = '<div><h4><a href="' + marker . url + '" class="map-marker">' + marker . title + '</a></h4><div>' +
60
+ image +
61
+ '<p style="overflow:hidden;">' + description +
62
+ ' <a href="' + marker . url + '" class="map-marker"><span>More...</span></a></p>' ;
63
+
64
+ placeinfowindow . setContent ( buble_content ) ;
65
+ placeinfowindow . open ( map , marker ) ;
66
+ } ) ;
67
+
41
68
for ( i = 0 ; i <= events . length ; i = i + 1 ) {
42
69
if ( events [ i ] && typeof events [ i ] === 'object' ) {
43
70
@@ -100,35 +127,6 @@ var Codeweek = window.Codeweek || {};
100
127
image : markImg ,
101
128
url : markUrl
102
129
} ) ;
103
-
104
- overlapSpiderifier . addListener ( 'click' , function ( marker ) {
105
- placeinfowindow . close ( ) ;
106
-
107
- var infoWindowContent = '' ,
108
- buble_content = '' ,
109
- image = '' ,
110
- description = '' ;
111
-
112
- if ( marker . image !== "" ) {
113
- image += '<img src="' + Codeweek . Index . media_url + marker . image + '" class="img-polaroid marker-buble-img">' ;
114
- }
115
-
116
- if ( marker . description . length > 150 ) {
117
- description = marker . description . substring ( 0 , 150 ) + '... ' ;
118
- } else {
119
- description = marker . description ;
120
- }
121
-
122
- buble_content = '<div><h4><a href="' + marker . url + '" class="map-marker">' + marker . title + '</a></h4><div>' +
123
- image +
124
- '<p style="overflow:hidden;">' + description +
125
- ' <a href="' + marker . url + '" class="map-marker"><span>More...</span></a></p>' ;
126
-
127
-
128
- placeinfowindow . setContent ( buble_content ) ;
129
- placeinfowindow . open ( marker . map , marker ) ;
130
- } ) ;
131
-
132
130
overlapSpiderifier . addMarker ( marker ) ;
133
131
134
132
return marker ;
0 commit comments