Skip to content

Commit f33cbe7

Browse files
fixing map marker infobox
1 parent 6394504 commit f33cbe7

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

pandas/index.html

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,10 @@ <h3 class="section-title">Locations</h3>
178178
<div id="map" style="height: 450px; width: 100%;"></div>
179179
<script>
180180
function initMap() {
181+
var infowindow=new google.maps.InfoWindow();
182+
181183
var map = new google.maps.Map(document.getElementById('map'), {
182-
zoom: 1,
184+
zoom: 2,
183185
center: {lat: 0., lng: 0.}
184186
});
185187

@@ -190,20 +192,47 @@ <h3 class="section-title">Locations</h3>
190192
lng: -0.086270},
191193
map: map
192194
});
195+
google.maps.event.addListener(
196+
london_bloomberg,
197+
'click',
198+
function(){
199+
infowindow.setContent(this.html);
200+
infowindow.open(map,this);
201+
}
202+
);
203+
193204
var madrid_pydata = new google.maps.Marker({
194205
title: "Madrid",
195206
html: "PyData Madrid<br><a href=\"https://www.meetup.com/PyData-Madrid/\">Website</a>",
196207
position: {lat: 40.4168209,
197208
lng: -3.7035725},
198209
map: map
199210
});
211+
google.maps.event.addListener(
212+
madrid_pydata,
213+
'click',
214+
function(){
215+
infowindow.setContent(this.html);
216+
infowindow.open(map,this);
217+
}
218+
);
219+
200220
var python_florence = new google.maps.Marker({
201221
title: "Florence",
202222
html: "Python Florence TBD",
203223
position: {lat: 43.7735238,
204224
lng: 11.2572189},
205225
map: map
206226
});
227+
google.maps.event.addListener(
228+
python_florence,
229+
'click',
230+
function(){
231+
infowindow.setContent(this.html);
232+
infowindow.open(map,this);
233+
}
234+
);
235+
207236
}
208237
</script>
209238
<script async defer with="100%" height="450px"

0 commit comments

Comments
 (0)