From b811b37228a52bb13e0cde31309c117f1a3329f2 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Mon, 24 Sep 2012 16:06:12 +0200 Subject: [PATCH] cf brutasse#37 - peopleArray is no more used --- .../static/djangopeople/js/maps.js | 30 ------------------- .../static/djangopeople/js/profile.js | 5 ---- 2 files changed, 35 deletions(-) diff --git a/djangopeople/djangopeople/static/djangopeople/js/maps.js b/djangopeople/djangopeople/static/djangopeople/js/maps.js index 66b0ff2..c595828 100644 --- a/djangopeople/djangopeople/static/djangopeople/js/maps.js +++ b/djangopeople/djangopeople/static/djangopeople/js/maps.js @@ -37,23 +37,6 @@ function plotPeopleOnMap(people, map) { return bounds; } - -function hidePeopleOnMap(peopleArray) { - if (peopleArray) { - for (i in peopleArray) { - peopleArray[i].setMap(null); - } - } -} - -function showPeopleOnMap(peopleArray, map) { - if (peopleArray) { - for (i in peopleArray) { - peopleArray[i].addTo(map); - } - } -} - // Creates a Marker object for a person function getPersonMarker(person) { var lat = person[0]; @@ -69,19 +52,6 @@ function getPersonMarker(person) { return marker; } -/* Creates an array of person Markers for easier toggling - * of their visibility on the map. - */ -function getPeopleArray(peopleList) { - var peopleArray = []; - $.each(peopleList, function(index, person) { - var marker = getPersonMarker(person); - peopleArray.push(marker); - }); - - return peopleArray; -} - function greenIconImage() { var greenIcon = L.icon({ iconUrl: STATIC_URL + 'djangopeople/img/green-bubble.png', diff --git a/djangopeople/djangopeople/static/djangopeople/js/profile.js b/djangopeople/djangopeople/static/djangopeople/js/profile.js index b0dd562..30aef83 100644 --- a/djangopeople/djangopeople/static/djangopeople/js/profile.js +++ b/djangopeople/djangopeople/static/djangopeople/js/profile.js @@ -44,7 +44,6 @@ function shrinkMap (map, latlng) { opacity: 1.0 }, 500, 'swing', function() { map._onResize() - // showPeopleOnMap(peopleArray, map); // Unbind event so user can actually interact with map $('#map').unbind('click', onMapClicked); @@ -59,10 +58,6 @@ function shrinkMap (map, latlng) { icon: greenIconImage(), }).addTo(map); - //gets an array of person map markers, used for hiding and showing them on - //the map - // var peopleArray = getPeopleArray(nearby_people); - }; jQuery(function($) {