]> gitweb.michael.orlitzky.com - dead/census-tools.git/commitdiff
Fixed a big array index bug.
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 24 Feb 2010 19:15:13 +0000 (14:15 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 24 Feb 2010 19:15:13 +0000 (14:15 -0500)
www/maps/maps/templates/javascript/routing.mako

index ecab0247e9252e8b1af10409f41ef6e039dd3057..1c72efdbb9aa223defe075d646107dd9f9fd93a0 100644 (file)
@@ -97,12 +97,12 @@ function get_directions(pairs_to_skip) {
        producer_latlng = producers[i].name;
       }
       
-      if (consumers[i].latitude && consumers[i].longitude) {
-       consumer_latlng = new google.maps.LatLng(consumers[i].latitude,
-                                                consumers[i].longitude);
+      if (consumers[j].latitude && consumers[j].longitude) {
+       consumer_latlng = new google.maps.LatLng(consumers[j].latitude,
+                                                consumers[j].longitude);
       }
       else {
-       consumer_latlng = consumers[i].name;
+       consumer_latlng = consumers[j].name;
       }
       
       var directions_request = {