]> err.no Git - mapper/blobdiff - src/map-download.c
Path: misc adjustments
[mapper] / src / map-download.c
index 2f07badd833e5fd337b7842cb895d1d7f78ffe22..d1505403cd0e93684d2bd72a6eb7f8d120cda9be 100644 (file)
@@ -53,7 +53,6 @@
 #include "ui-common.h"
 #include "settings.h"
 #include "latlon.h"
-#include "gpx.h"
 #include "map-download.h"
 #include "iap.h"
 #include "map-repo.h"
@@ -131,9 +130,9 @@ while (_curl_multi && (msg = curl_multi_info_read(_curl_multi, &num_msgs))) {
                if (msg->easy_handle == _autoroute_data.curl_easy) {
                        /* This is the autoroute download. */
                        /* Now, parse the autoroute and update the display. */
-                       if (_autoroute_data.enabled && gpx_parse(&_route, _autoroute_data.rdl_data.bytes, _autoroute_data.rdl_data.bytes_read, 0)) {
+                       if (_autoroute_data.enabled && path_gpx_parse(_route, _autoroute_data.rdl_data.bytes, _autoroute_data.rdl_data.bytes_read, 0)) {
                                /* Find the nearest route point, if we're connected. */
-                               path_find_nearest_point(_route);
+                               path_find_nearest_point(_route, _gps->data.lat, _gps->data.lon);
                        }
                        route_cancel_autoroute(_route, TRUE);   /* We're done. Clean up. */
                } else {