]> gitweb.michael.orlitzky.com - dead/census-tools.git/blobdiff - www/maps/maps/templates/javascript/routing.mako
Fixed a big array index bug.
[dead/census-tools.git] / 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 = {