Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
* Draw the marker of the members on the map
* So we can see them
drawMarkers: function() {
var self = this;
var infowindow = new google.maps.InfoWindow();
// We loop through the members
for (var i = 0; i < this.members.length; i++) {
var memberLocation = this.members[i];
var marker = new google.maps.Marker({
position: new google.maps.LatLng(
map: self.mapObject
var htmlContent = '';
htmlContent += '<div class="text-center">';
htmlContent += '<img src="'+ memberLocation.avatar_url +'" class="w-50 rounded rounded-circle">';
htmlContent += '<h3 class="d-block mb-0 mt-2">'+ +'</h3>';
htmlContent += '<i>'+ +'</i>';
htmlContent += '</div>';
google.maps.event.addListener(marker, 'click', (function(marker) {
return function() {
infowindow.setContent(htmlContent);, marker);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.