]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions.js
Merge remote-tracking branch 'upstream/pull/5083'
[rails.git] / app / assets / javascripts / index / directions.js
index e2cdd3a548b80e52f33048b6ed3979ea9ce8493a..3f78c708945147f08df780715d320c66a56a8625 100644 (file)
@@ -115,18 +115,6 @@ OSM.Directions = function (map) {
     // Cancel any route that is already in progress
     if (routeRequest) routeRequest.abort();
 
-    // go fetch geocodes for any endpoints which have not already
-    // been geocoded.
-    for (var ep_i = 0; ep_i < 2; ++ep_i) {
-      var endpoint = endpoints[ep_i];
-      if (!endpoint.hasGeocode && !endpoint.awaitingGeocode) {
-        endpoint.getGeocode();
-      }
-    }
-    if (endpoints[0].awaitingGeocode || endpoints[1].awaitingGeocode) {
-      return;
-    }
-
     var o = endpoints[0].latlng,
         d = endpoints[1].latlng;