Skip to content

Instantly share code, notes, and snippets.

@krrishd
Created March 12, 2014 01:38
Show Gist options
  • Save krrishd/9498995 to your computer and use it in GitHub Desktop.
Save krrishd/9498995 to your computer and use it in GitHub Desktop.
for (i = 1; i < ($scope.locations.length); i++) {
var connMarker = L.marker([$scope.locations[i].latitude, $scope.locations[i].longitude]).addTo(map).addEventListener("click", function(e) {
var item;
var connection;
for(b = 0; b < $scope.locations.length; b++) {
item = $scope.data.identity_connections[b];
if (item.location_id == $scope.locations[i].id) {
connection = item;
console.log(connection);
break;
}
}
this.bindPopup(connection.first_name + " " + connection.last_name).openPopup();
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment