g_signal_connect(G_OBJECT(map_widget), "scroll_event", G_CALLBACK(map_cb_scroll_event), NULL);
gtk_widget_add_events(map_widget, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
- | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK);
+ | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK);
map_poi_init(map_widget);
else
osm_set_way_range(2800);
-/* XXX: Don't pulse progress if we don't need to check location ! */
-osm_progress_set_widget(_db, _progress_item);
-osm_get_location_data(ilat, ilon, _gps->data.heading, &map_loc);
-if (map_loc.valid)
- map_set_place_information(map_loc.street, map_loc.primary, map_loc.secondary);
-else
- map_set_place_information(NULL, NULL, NULL);
-osm_progress_set_widget(_db, NULL);
-
map_update_destination(lat, lon);
+if (osm_check_location(&map_loc, ilat, ilon)==FALSE) {
+ osm_progress_set_widget(_db, _progress_item);
+ osm_get_location_data(ilat, ilon, _gps->data.heading, &map_loc);
+ if (map_loc.valid)
+ map_set_place_information(map_loc.street, map_loc.primary, map_loc.secondary);
+ else
+ map_set_place_information(NULL, NULL, NULL);
+ osm_progress_set_widget(_db, NULL);
+} else g_debug("IN PLACE");
+
inp=FALSE;
}